[Intel-gfx] [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor.

zhigang.gong at linux.intel.com zhigang.gong at linux.intel.com
Thu Jul 12 12:47:51 CEST 2012


From: Zhigang Gong <zhigang.gong at linux.intel.com>

glamor_glyphs will never fallback. We don't need to keep a
uxa glyphs cache picture here. Thus simply bypass the
corresponding operations.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 uxa/uxa-glyphs.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index 6bdf101..527942a 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -112,6 +112,9 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen)
 	uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
 	int i;
 
+	if (uxa_screen->info->flags & UXA_USE_GLAMOR)
+		return;
+
 	if (!uxa_screen->glyph_cache_initialized)
 		return;
 
@@ -211,6 +214,11 @@ bail:
 
 Bool uxa_glyphs_init(ScreenPtr pScreen)
 {
+
+	uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
+
+	if (uxa_screen->info->flags & UXA_USE_GLAMOR)
+		return TRUE;
 #if HAS_DIXREGISTERPRIVATEKEY
 	if (!dixRegisterPrivateKey(&uxa_glyph_key, PRIVATE_GLYPH, 0))
 		return FALSE;
@@ -307,8 +315,10 @@ uxa_glyph_unrealize(ScreenPtr screen,
 	struct uxa_glyph *priv;
 	uxa_screen_t *uxa_screen = uxa_get_screen(screen);
 
-	if (uxa_screen->info->flags & UXA_USE_GLAMOR)
+	if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
 		glamor_glyph_unrealize(screen, glyph);
+		return;
+	}
 
 	/* Use Lookup in case we have not attached to this glyph. */
 	priv = dixLookupPrivate(&glyph->devPrivates, &uxa_glyph_key);
-- 
1.7.4.4




More information about the Intel-gfx mailing list