All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhigang.gong@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor.
Date: Thu, 12 Jul 2012 18:47:51 +0800	[thread overview]
Message-ID: <1342090071-18809-2-git-send-email-zhigang.gong@linux.intel.com> (raw)
In-Reply-To: <1342090071-18809-1-git-send-email-zhigang.gong@linux.intel.com>

From: Zhigang Gong <zhigang.gong@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@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

  reply	other threads:[~2012-07-12 11:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 10:47 [PATCH 1/2] intel_dri: Fixed a buffer leak when enable glamor zhigang.gong
2012-07-12 10:47 ` zhigang.gong [this message]
2012-07-12 12:11   ` [PATCH 2/2] uxa-glyphs: Bypass uxa glyphs operations if using glamor Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342090071-18809-2-git-send-email-zhigang.gong@linux.intel.com \
    --to=zhigang.gong@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.