HW Acceleration of Layered Windows for RTM
To obtain GPU-accelerated rendering, Windows Presentation Foundation (WPF) normally renders and presents graphical content through the DirectX pipeline – including the composition of the scene geometry and presentation of the results.
Since before Windows XP, Win32 has supported an alternative window presentation mechanism called “layered windows”. Layered windows allow for top-level window transparency effects when composed with the desktop; on WPF, this feature is available by setting Window.AllowsTransparency="true". For example, to get a dropshadow effect, WPF composes Menus and Popups as layered windows.
There are two aspects to rendering: composing the scene, and presenting the surface. The Windows Vista D3D 9.0 graphics API provides support for rendering to surfaces with an alpha channel, but does not directly support a mechanism to present that surface to the desktop and retain alpha information. On Windows Vista, WPF renders via hardware accelerated DX, acquires the surface via IDirect3DSurface9::GetDC, and presents to the screen via GDI.
DirectX 9.0C, the version of DX available on Windows XP, does not support IDirect3DSurface9::GetDC of a surface with an alpha channel. As such, support for hardware accelerated rendering when using Window.AllowsTransparency="true" will not be available on Windows XP from the RC1 and RTM releases of WPF.
Comments
Anonymous
September 19, 2006
Seema posted the final word on hardware acceleration for WPF layered windows. Long story short, layered...Anonymous
September 26, 2006
PingBack from http://laurenlavoie.com/avalon/192Anonymous
October 25, 2006
Previously, I had posted that Avalon’s layered windows on XP will be rendered via the software pipeline.Anonymous
December 08, 2006
A feature that the WPF team added late to WPF was the ability to allow transparent windows ( propertyAnonymous
March 18, 2007
PingBack from http://www.ekampf.com/blog/2006/10/01/WPFLayeredWindowsAndWindowsXP.aspxAnonymous
July 05, 2007
The comment has been removed