From: Elizabeth Figura zfigura@codeweavers.com
The following cause an image to be immediately visible on Windows:
* Direct3D Present()
* wglSwapBuffers() [after drawing to the back buffer]
* glFlush() [after drawing to the front buffer. Note that glFlush() is both necessary and sufficient.]
* vkQueuePresent()
This is all of the paths that ultimately call client_surface_present().
In order to ensure that pixels are immediately visible on Wine as well, we need to flush immediately after presenting.
Based on a patch by Henri Verbeet. --- dlls/winex11.drv/init.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 1ea51e9a387..f6fe0aed894 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -415,6 +415,7 @@ static void X11DRV_client_surface_present( struct client_surface *client, HDC hd
NtGdiStretchBlt( surface->hdc_dst, 0, 0, rect_dst.right - rect_dst.left, rect_dst.bottom - rect_dst.top, surface->hdc_src, 0, 0, surface->rect.right, surface->rect.bottom, SRCCOPY, 0 ); + XFlush( gdi_display );
done: if (region) NtGdiDeleteObjectApp( region );