Mesa (master): glx: Dont use dri2WaitX() to update fake front

Kristian Høgsberg krh at kemper.freedesktop.org
Tue Jul 20 02:48:17 UTC 2010


Module: Mesa
Branch: master
Commit: b006d465ea0ea680326f702ad248544c576301a2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b006d465ea0ea680326f702ad248544c576301a2

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Mon Jul 19 10:19:22 2010 -0400

glx: Dont use dri2WaitX() to update fake front

This saves a superfluous flush and a create/destryo region.

---

 src/glx/dri2_glx.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 04d900c..96d33e0 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -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




More information about the mesa-commit mailing list