From 58b089febceca1e915607bb723ee658aaa9dbed3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 May 2010 09:11:46 +0100 Subject: [PATCH] uxa: Avoid using blits when with PictFilterConvolution References: Bug 28098 Compiz renders shadows wrong, garbage line of pixels along left and top edge of windows https://bugs.freedesktop.org/show_bug.cgi?id=28098 Signed-off-by: Chris Wilson --- uxa/uxa-render.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index b4b7a97c..b83b9dc5 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -765,7 +765,9 @@ uxa_acquire_drawable(ScreenPtr pScreen, int tx, ty; depth = pSrc->pDrawable->depth; - if (depth == 1 || !transform_is_integer_translation(pSrc->transform, &tx, &ty)) { + if (depth == 1 || + pSrc->filter == PictFilterConvolution || /* XXX */ + !transform_is_integer_translation(pSrc->transform, &tx, &ty)) { /* XXX extract the sample extents and do the transformation on the GPU */ pDst = uxa_render_picture(pScreen, pSrc, pSrc->format | (BitsPerPixel(pSrc->pDrawable->depth) << 24), @@ -1387,7 +1389,7 @@ uxa_composite(CARD8 op, goto fallback; /* Remove repeat in source if useless */ - if (pSrc->pDrawable && pSrc->repeat && + if (pSrc->pDrawable && pSrc->repeat && pSrc->filter != PictFilterConvolution && transform_is_integer_translation(pSrc->transform, &tx, &ty) && (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1) && drawable_contains(pSrc->pDrawable, xSrc + tx, ySrc + ty, width, height)) @@ -1431,6 +1433,7 @@ uxa_composite(CARD8 op, if (ret == 1) goto done; } else if (compatible_formats (op, pDst, pSrc) && + pSrc->filter != PictFilterConvolution && transform_is_integer_translation(pSrc->transform, &tx, &ty)) { if (!pSrc->repeat && drawable_contains(pSrc->pDrawable, @@ -1509,6 +1512,7 @@ uxa_composite(CARD8 op, /* Remove repeat in mask if useless */ if (pMask && pMask->pDrawable && pMask->repeat && + pMask->filter != PictFilterConvolution && transform_is_integer_translation(pMask->transform, &tx, &ty) && (pMask->pDrawable->width > 1 || pMask->pDrawable->height > 1) && drawable_contains(pMask->pDrawable, xMask + tx, yMask + ty, width, height))