xf86-video-intel: uxa/uxa.c

Eric Anholt anholt at kemper.freedesktop.org
Tue Dec 16 10:24:40 PST 2008


 uxa/uxa.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit ecdd706873c1f990f4a78fbaecf7380411edabcd
Author: Eric Anholt <eric at anholt.net>
Date:   Sun Dec 14 16:09:25 2008 -0800

    uxa: Correctly prepare/finishaccess of stipple in ValidateGC (and only it)
    
    This avoids prepare/finish_access_gc overhead when we're not changing things
    (since GCTile is already handled) and get us the RW flag for the prepare on
    of the stipple pixmap so thing will be synced correctly.

diff --git a/uxa/uxa.c b/uxa/uxa.c
index 5b6f537..102717d 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -237,9 +237,16 @@ uxa_validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 	changes &= ~GCTile;
     }
 
-    uxa_prepare_access_gc(pGC);
-    fbValidateGC (pGC, changes, pDrawable);
-    uxa_finish_access_gc(pGC);
+    if (changes & GCStipple && pGC->stipple) {
+	/* We can't inline stipple handling like we do for GCTile because it sets
+	 * fbgc privates.
+	 */
+	uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW);
+	fbValidateGC (pGC, changes, pDrawable);
+	uxa_finish_access(&pGC->stipple->drawable);
+    } else {
+	fbValidateGC (pGC, changes, pDrawable);
+    }
 
     pGC->ops = (GCOps *) &uxa_ops;
 }


More information about the xorg-commit mailing list