OSDN Git Service

glx: Dont use dri2WaitX() to update fake front
authorKristian Høgsberg <krh@bitplanet.net>
Mon, 19 Jul 2010 14:19:22 +0000 (10:19 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 20 Jul 2010 02:45:50 +0000 (22:45 -0400)
This saves a superfluous flush and a create/destryo region.

src/glx/dri2_glx.c

index 04d900c..96d33e0 100644 (file)
@@ -97,8 +97,6 @@ struct __GLXDRIdrawablePrivateRec
    int swap_interval;
 };
 
-static void dri2WaitX(__GLXDRIdrawable * pdraw);
-
 static void
 dri2DestroyContext(__GLXDRIcontext * context,
                    __GLXscreenConfigs * psc, Display * dpy)
@@ -318,7 +316,9 @@ dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height)
    /* Refresh the fake front (if present) after we just damaged the real
     * front.
     */
-   dri2WaitX(pdraw);
+   DRI2CopyRegion(pdraw->psc->dpy, pdraw->xDrawable, region,
+                 DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
+   XFixesDestroyRegion(pdraw->psc->dpy, region);
 }
 
 static void