diff options
Diffstat (limited to 'uxa/uxa-glyphs.c')
-rw-r--r-- | uxa/uxa-glyphs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index 6c9ea0d6..0091dc23 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -65,6 +65,7 @@ #include <stdlib.h> #include "uxa-priv.h" +#include "uxa-glamor.h" #include "../src/common.h" #include "mipict.h" @@ -304,6 +305,7 @@ uxa_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph) { struct uxa_glyph *priv; + uxa_screen_t *uxa_screen = uxa_get_screen(screen); /* Use Lookup in case we have not attached to this glyph. */ priv = dixLookupPrivate(&glyph->devPrivates, &uxa_glyph_key); @@ -314,6 +316,9 @@ uxa_glyph_unrealize(ScreenPtr screen, uxa_glyph_set_private(glyph, NULL); free(priv); + + if (uxa_screen->info->flags & UXA_USE_GLAMOR) + glamor_glyph_unrealize(screen, glyph); } /* Cut and paste from render/glyph.c - probably should export it instead */ @@ -1062,6 +1067,23 @@ uxa_glyphs(CARD8 op, int width, height, ret; PicturePtr localDst = pDst; + if (uxa_screen->info->flags & UXA_USE_GLAMOR) { + int ok; + + uxa_picture_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW); + uxa_picture_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO); + ok = glamor_glyphs_nf(op, + pSrc, pDst, maskFormat, + xSrc, ySrc, nlist, list, glyphs); + uxa_picture_finish_access(pSrc, UXA_GLAMOR_ACCESS_RO); + uxa_picture_finish_access(pDst, UXA_GLAMOR_ACCESS_RW); + + if (!ok) + goto fallback; + + return; + } + if (!uxa_screen->info->prepare_composite || uxa_screen->swappedOut || uxa_screen->force_fallback || |