summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-16 13:51:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-16 13:52:35 +0100
commit21b5fd427f5ed6c99276349a7ae128eea580dd72 (patch)
tree82455c9d65bc98bc7d9845dc751c0b0a97f69771 /uxa
parent61835701fd411d3bb550ceee3365e30639e46861 (diff)
uxa: Tidy uxa_solid_rects()
Move the operator reduction after a few fallbacks, closer to its use. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-render.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index e062001e..4c552cab 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -943,11 +943,6 @@ uxa_solid_rects (CARD8 op,
if (!pixman_region_not_empty(dst->pCompositeClip))
return;
- if (op == PictOpClear)
- color->red = color->green = color->blue = color->alpha = 0;
- if (color->alpha >= 0xff00 && op == PictOpOver)
- op = PictOpSrc;
-
if (dst->alphaMap)
goto fallback;
@@ -966,6 +961,11 @@ uxa_solid_rects (CARD8 op,
pixman_region_translate(&region, dst_x, dst_y);
boxes = pixman_region_rectangles(&region, &num_boxes);
+ if (op == PictOpClear)
+ color->red = color->green = color->blue = color->alpha = 0;
+ if (color->alpha >= 0xff00 && op == PictOpOver)
+ op = PictOpSrc;
+
/* Using GEM, the relocation costs outweigh the advantages of the blitter */
if (num_boxes == 1 && (op == PictOpSrc || op == PictOpClear)) {
CARD32 pixel;