summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-15 00:50:42 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-05-17 20:40:14 +0100
commitb94135c14200cab73ec1d9cfdd5093f28bd365fa (patch)
treeec0ba6c521e26e6b1f6a853486fc2ac9561faf9e /uxa
parent00141e1045d96844ad196cfe3ae1d07a0f9045cb (diff)
uxa: Fix order of conditionals to only run fill_region for SRC or opaque
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 95654cffa8643f61f153218f27e800df75b9bdee) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-render.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 29d15a24..172b40a5 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -1393,79 +1393,79 @@ uxa_composite(CARD8 op,
if (ret == 1)
goto done;
} else if (compatible_formats (op, pDst, pSrc) &&
- !pSrc->repeat &&
- transform_is_integer_translation(pSrc->transform, &tx, &ty) &&
- drawable_contains(pSrc->pDrawable,
+ transform_is_integer_translation(pSrc->transform, &tx, &ty)) {
+ if (!pSrc->repeat &&
+ drawable_contains(pSrc->pDrawable,
xSrc + tx, ySrc + ty,
width, height)) {
- xDst += pDst->pDrawable->x;
- yDst += pDst->pDrawable->y;
- xSrc += pSrc->pDrawable->x + tx;
- ySrc += pSrc->pDrawable->y + ty;
-
- if (!miComputeCompositeRegion
- (&region, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height))
- goto done;
-
- uxa_copy_n_to_n(pSrc->pDrawable,
- pDst->pDrawable, NULL,
- REGION_RECTS(&region),
- REGION_NUM_RECTS(&region),
- xSrc - xDst, ySrc - yDst, FALSE,
- FALSE, 0, NULL);
- REGION_UNINIT(pDst->pDrawable->pScreen,
- &region);
- goto done;
- } else if (pSrc->pDrawable->type == DRAWABLE_PIXMAP &&
- pSrc->repeatType == RepeatNormal &&
- transform_is_integer_translation(pSrc->transform, &tx, &ty)) {
- DDXPointRec patOrg;
-
- /* Let's see if the driver can do the repeat
- * in one go
- */
- if (uxa_screen->info->prepare_composite) {
- ret = uxa_try_driver_composite(op, pSrc,
- pMask, pDst,
- xSrc, ySrc,
- xMask, yMask,
- xDst, yDst,
- width, height);
- if (ret == 1)
+ xDst += pDst->pDrawable->x;
+ yDst += pDst->pDrawable->y;
+ xSrc += pSrc->pDrawable->x + tx;
+ ySrc += pSrc->pDrawable->y + ty;
+
+ if (!miComputeCompositeRegion
+ (&region, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height))
goto done;
- }
- /* Now see if we can use
- * uxa_fill_region_tiled()
- */
- xDst += pDst->pDrawable->x;
- yDst += pDst->pDrawable->y;
- xSrc += pSrc->pDrawable->x + tx;
- ySrc += pSrc->pDrawable->y + ty;
-
- if (!miComputeCompositeRegion
- (&region, pSrc, pMask, pDst, xSrc, ySrc,
- xMask, yMask, xDst, yDst, width, height))
+ uxa_copy_n_to_n(pSrc->pDrawable,
+ pDst->pDrawable, NULL,
+ REGION_RECTS(&region),
+ REGION_NUM_RECTS(&region),
+ xSrc - xDst, ySrc - yDst, FALSE,
+ FALSE, 0, NULL);
+ REGION_UNINIT(pDst->pDrawable->pScreen,
+ &region);
goto done;
+ } else if (pSrc->repeat && pSrc->repeatType == RepeatNormal &&
+ pSrc->pDrawable->type == DRAWABLE_PIXMAP) {
+ DDXPointRec patOrg;
+
+ /* Let's see if the driver can do the repeat
+ * in one go
+ */
+ if (uxa_screen->info->prepare_composite) {
+ ret = uxa_try_driver_composite(op, pSrc,
+ pMask, pDst,
+ xSrc, ySrc,
+ xMask, yMask,
+ xDst, yDst,
+ width, height);
+ if (ret == 1)
+ goto done;
+ }
- /* pattern origin is the point in the
- * destination drawable
- * corresponding to (0,0) in the source */
- patOrg.x = xDst - xSrc;
- patOrg.y = yDst - ySrc;
+ /* Now see if we can use
+ * uxa_fill_region_tiled()
+ */
+ xDst += pDst->pDrawable->x;
+ yDst += pDst->pDrawable->y;
+ xSrc += pSrc->pDrawable->x + tx;
+ ySrc += pSrc->pDrawable->y + ty;
+
+ if (!miComputeCompositeRegion
+ (&region, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height))
+ goto done;
- ret = uxa_fill_region_tiled(pDst->pDrawable,
- &region,
- (PixmapPtr) pSrc->
- pDrawable, &patOrg,
- FB_ALLONES, GXcopy);
+ /* pattern origin is the point in the
+ * destination drawable
+ * corresponding to (0,0) in the source */
+ patOrg.x = xDst - xSrc;
+ patOrg.y = yDst - ySrc;
- REGION_UNINIT(pDst->pDrawable->pScreen,
- &region);
+ ret = uxa_fill_region_tiled(pDst->pDrawable,
+ &region,
+ (PixmapPtr) pSrc->
+ pDrawable, &patOrg,
+ FB_ALLONES, GXcopy);
- if (ret)
- goto done;
+ REGION_UNINIT(pDst->pDrawable->pScreen,
+ &region);
+
+ if (ret)
+ goto done;
+ }
}
}