summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-01-24 09:04:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-01-24 09:04:16 +0000
commit31bbd7f919f4f1f545dd49861c15e60561c075cb (patch)
treedb8898b2953fecb078c02f4167ba6ec59a44c77a
parent326fe00df4160fbc3513ddbedfec90bdb2d7101b (diff)
uxa/uxa-render: Always remove useless repeats during composite.
I added a jump if there was no src or mask Drawable, but we do actually need to check for useless src repeats even if we have a source-only mask. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--uxa/uxa-render.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 38b9bb2a..9ccc7558 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -968,14 +968,11 @@ uxa_composite(CARD8 op,
if (uxa_screen->swappedOut)
goto fallback;
- if (pSrc->pDrawable == NULL || (pMask && pMask->pDrawable == NULL))
- goto composite;
-
/* Remove repeat in source if useless */
- if (pSrc->repeat && (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1 ) &&
- !pSrc->transform && xSrc >= 0 &&
- (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 &&
- (ySrc + height) <= pSrc->pDrawable->height)
+ if (pSrc->pDrawable && pSrc->repeat && !pSrc->transform &&
+ (pSrc->pDrawable->width > 1 || pSrc->pDrawable->height > 1) &&
+ xSrc >= 0 && (xSrc + width) <= pSrc->pDrawable->width &&
+ ySrc >= 0 && (ySrc + height) <= pSrc->pDrawable->height)
pSrc->repeat = 0;
if (!pMask) {
@@ -1079,7 +1076,6 @@ uxa_composite(CARD8 op,
}
}
-composite:
/* Remove repeat in mask if useless */
if (pMask && pMask->repeat && !pMask->transform && pMask->pDrawable &&
(pMask->pDrawable->width > 1 || pMask->pDrawable->height > 1) &&