From a1c2bdb6ab7a4f374844f80e83620b155991e817 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 20 May 2010 10:13:06 +0200 Subject: EXA: Wrap Glyphs even without Composite acceleration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to avoid migration ping-pong when accumulating glyphs in a mask picture. Signed-off-by: Michel Dänzer Reviewed-by: Adam Jackson Signed-off-by: Keith Packard --- exa/exa.c | 5 ++++- exa/exa_priv.h | 11 +++++++++++ exa/exa_unaccel.c | 22 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) (limited to 'exa') diff --git a/exa/exa.c b/exa/exa.c index 7b3b9a0ad..46a850f8f 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -932,8 +932,11 @@ exaDriverInit (ScreenPtr pScreen, if (ps) { wrap(pExaScr, ps, Composite, exaComposite); - if (pScreenInfo->PrepareComposite) + if (pScreenInfo->PrepareComposite) { wrap(pExaScr, ps, Glyphs, exaGlyphs); + } else { + wrap(pExaScr, ps, Glyphs, ExaCheckGlyphs); + } wrap(pExaScr, ps, Trapezoids, exaTrapezoids); wrap(pExaScr, ps, Triangles, exaTriangles); wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps); diff --git a/exa/exa_priv.h b/exa/exa_priv.h index ed8be31f6..14c99e946 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -509,6 +509,17 @@ ExaCheckComposite (CARD8 op, CARD16 width, CARD16 height); +void +ExaCheckGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs); + /* exa_offscreen.c */ void ExaOffscreenSwapOut (ScreenPtr pScreen); diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index 2f8c4622d..402d76db9 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -680,6 +680,28 @@ out_no_clip: EXA_POST_FALLBACK(pScreen); } +/** + * Avoid migration ping-pong when using a mask. + */ +void +ExaCheckGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + EXA_PRE_FALLBACK(pScreen); + + miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + + EXA_POST_FALLBACK(pScreen); +} + void ExaCheckAddTraps (PicturePtr pPicture, INT16 x_off, -- cgit v1.2.3