diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-16 13:51:41 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2010-05-17 20:41:54 +0100 |
commit | 682f39c9143960c75b5ffc3def6284e16b98c18b (patch) | |
tree | 03857c256f025f2ae2af9026e4c95cec243735ca /uxa/uxa-render.c | |
parent | e359c1945052d91310c7d2b89c758487b0546658 (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>
(cherry picked from commit 21b5fd427f5ed6c99276349a7ae128eea580dd72)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r-- | uxa/uxa-render.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index d98774ef..047112ed 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -906,11 +906,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; @@ -929,6 +924,11 @@ uxa_solid_rects (CARD8 op, pixman_region_translate(®ion, dst_x, dst_y); boxes = pixman_region_rectangles(®ion, &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; |