Is double-buffering still required when Desktop Composition is enabled?
In Microsoft's Application Compatibility Guide:
Graphical Device Interface (GDI)
Prior to Windows Vista and Windows Server 2008, a window handle (HWND) was painted directly to the screen, which had certain benefits, but limited how Windows could display and manage top-level windows. In Windows Vista and Windows Server 2008, all top-level windows are rendered to an off-screen bitmap (similar to WS_EX_LAYERED), and the Desktop Window Manager combines the images together to draw the desktop.
It sounds like all rendering is now done to an off-screen bitmap:
windows are rendered to an off-screen bitmap
Is this correct?
The reason i ask is because i still see flickering during the standard paint cycle:
- WM_ERASEBKGND
- WM_PAINT
while desktop composition is enabled:
i would have assumed that between the calls to
BeginPaint(hWnd, paintStructure);
...
EndPaint(hWnd, paintStructure);
that all painting would happen to a back buffer:
windows are rendered to an off-screen bitmap
Meanwhile the a front buffer would stay unaffected.