summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-08 11:04:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-08 11:18:01 +0000
commitf6474883d325cff443da9ceaa99ec734e6cdc1d6 (patch)
tree17515997c2af8bf688faaa924d2e53f70c8325cf /src/sna/gen6_render.c
parent2ae3cd36ae98fa43716ef482e70364e7563cf1ea (diff)
sna/gen2+: Use the reduced operator from CompositeRectangles
Do not attempt to further reduce the operator locally in each backend as the reduction is already performed in the upper layer. References: https://bugs.freedesktop.org/show_bug.cgi?id=42606 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 390cb0a9..764b6293 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -3655,29 +3655,24 @@ gen6_render_fill_boxes(struct sna *sna,
return FALSE;
}
- if (prefer_blt_fill(sna, dst_bo) ||
- too_large(dst->drawable.width, dst->drawable.height) ||
- !gen6_check_dst_format(format)) {
+ if (op <= PictOpSrc &&
+ (prefer_blt_fill(sna, dst_bo) ||
+ too_large(dst->drawable.width, dst->drawable.height) ||
+ !gen6_check_dst_format(format))) {
uint8_t alu = -1;
- if (op == PictOpClear || (op == PictOpOutReverse && color->alpha >= 0xff00))
+ pixel = 0;
+ if (op == PictOpClear)
alu = GXclear;
-
- if (op == PictOpSrc || (op == PictOpOver && color->alpha >= 0xff00)) {
+ else if (sna_get_pixel_from_rgba(&pixel,
+ color->red,
+ color->green,
+ color->blue,
+ color->alpha,
+ format))
alu = GXcopy;
- if (color->alpha <= 0x00ff)
- alu = GXclear;
- }
- pixel = 0;
- if ((alu == GXclear ||
- (alu == GXcopy &&
- sna_get_pixel_from_rgba(&pixel,
- color->red,
- color->green,
- color->blue,
- color->alpha,
- format))) &&
+ if (alu != -1 &&
sna_blt_fill_boxes(sna, alu,
dst_bo, dst->drawable.bitsPerPixel,
pixel, box, n))