From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhigang.gong@linux.intel.com Subject: [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor. Date: Thu, 12 Jul 2012 18:47:51 +0800 Message-ID: <1342090071-18809-2-git-send-email-zhigang.gong@linux.intel.com> References: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 19EE19EC6D for ; Thu, 12 Jul 2012 04:12:12 -0700 (PDT) In-Reply-To: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhigang Gong 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 --- 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