diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-08 11:04:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-08 11:18:01 +0000 |
commit | f6474883d325cff443da9ceaa99ec734e6cdc1d6 (patch) | |
tree | 17515997c2af8bf688faaa924d2e53f70c8325cf /src/sna/gen5_render.c | |
parent | 2ae3cd36ae98fa43716ef482e70364e7563cf1ea (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/gen5_render.c')
-rw-r--r-- | src/sna/gen5_render.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 6763edf4..01604ef9 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -3241,29 +3241,24 @@ gen5_render_fill_boxes(struct sna *sna, return FALSE; } - if (prefer_blt_fill(sna) || - too_large(dst->drawable.width, dst->drawable.height) || - !gen5_check_dst_format(format)) { + if (op <= PictOpSrc && + (prefer_blt_fill(sna) || + too_large(dst->drawable.width, dst->drawable.height) || + !gen5_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)) |