xorg/vmwgfx: Flush even if we don't autopaint the color key
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 26 Nov 2010 09:06:47 +0000 (10:06 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 26 Nov 2010 09:27:54 +0000 (10:27 +0100)
This may help paint the colorkey before overlay updates in some
situations where the app paints the color key (mainly xine).

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/targets/xorg-vmwgfx/vmw_video.c

index 719646afaee73c209e5577ef8166c59887c4506e..3d907575ece1115b6e204a42503be0938d7410f7 100644 (file)
@@ -556,10 +556,10 @@ vmw_video_port_init(ScrnInfoPtr pScrn, struct vmw_video_port *port,
 
     REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes);
 
-    if (port->isAutoPaintColorkey) {
+    if (port->isAutoPaintColorkey)
        xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes);
-       xorg_flush(pScrn->pScreen);
-    }
+
+    xorg_flush(pScrn->pScreen);
 
     return port->play(pScrn, port, src_x, src_y, drw_x, drw_y, src_w, src_h,
                       drw_w, drw_h, format, buf, width, height, clipBoxes);
@@ -646,12 +646,12 @@ vmw_video_port_play(ScrnInfoPtr pScrn, struct vmw_video_port *port,
      */
     if (!REGION_EQUAL(pScrn->pScreen, &port->clipBoxes, clipBoxes)) {
         REGION_COPY(pScrn->pScreen, &port->clipBoxes, clipBoxes);
-        if (port->isAutoPaintColorkey) {
+        if (port->isAutoPaintColorkey)
             xf86XVFillKeyHelper(pScrn->pScreen, port->colorKey, clipBoxes);
-           xorg_flush(pScrn->pScreen);
-        }
     }
 
+    xorg_flush(pScrn->pScreen);
+
     ret = drmCommandWrite(vmw->fd, DRM_VMW_CONTROL_STREAM, &arg, sizeof(arg));
     if (ret) {
        vmw_video_port_cleanup(pScrn, port);