summaryrefslogtreecommitdiff
path: root/uxa/uxa-render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-15 09:11:46 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-17 20:41:06 +0100
commite3f027caf5e7645f468621ade14eb31e19d9fa6f (patch)
treea2dd008baad2d0291b12def82fb0c2602db6c63b /uxa/uxa-render.c
parent2ed7dbeab83c1387df104ca38d1a8e9d748cea1a (diff)
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 <chris@chris-wilson.co.uk> (cherry picked from commit 58b089febceca1e915607bb723ee658aaa9dbed3) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r--uxa/uxa-render.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index d3b4ec4c..3534b7d2 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -728,7 +728,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),
@@ -1350,7 +1352,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))
@@ -1394,6 +1396,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,
@@ -1472,6 +1475,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))