[PATCH] winex11: Call XFlush after XRenderComposite.

Connor McAdams cmcadams at codeweavers.com
Fri Mar 11 13:30:58 CST 2022


Make sure to flush the output buffer after drawing. Helps applications
that draw to HWNDs belonging to another process.

Signed-off-by: Connor McAdams <cmcadams at codeweavers.com>
---

This fixes an issue with Chromium based applications that draw on HWNDs
that belong to other processes. Without calling XFlush, we often end up
one frame behind, with the XFlush call in free_xrender_picture causing
the update.

This may not be the correct way to solve the issue I'm dealing with, so
if not, I'd also appreciate feedback/ideas on a proper way to solve the
problem.

---
 dlls/winex11.drv/xrender.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 5ede97fb026..fce1b231919 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1508,6 +1508,8 @@ static void xrender_blit( int op, Picture src_pict, Picture mask_pict, Picture d
     }
     pXRenderComposite( gdi_display, op, src_pict, mask_pict, dst_pict,
                        x_offset, y_offset, 0, 0, x_dst, y_dst, width_dst, height_dst );
+
+    XFlush( gdi_display );
 }
 
 /* Helper function for (stretched) mono->color blitting using xrender */
-- 
2.25.1




More information about the wine-devel mailing list