diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-26 18:11:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-27 10:25:37 +0100 |
commit | b34e7454574f36796560955fb9d3d33ca00924d6 (patch) | |
tree | 5c8967e4d62cf4e0b32bf60912fed4e6f46a5e07 | |
parent | 389241aa6469b2e64a58cc0527e3310fdc69ffb7 (diff) |
sna/blt: Convert Copy with color 0 into a Clear
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_blt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 8d07035d..2aa5bc1c 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -142,6 +142,9 @@ static bool sna_blt_fill_init(struct sna *sna, if (pitch > MAXSHORT) return FALSE; + if (pixel == 0) + alu = GXclear; + blt->br13 = 1<<31 | (fill_ROP[alu] << 16) | pitch; switch (bpp) { default: assert(0); @@ -1524,6 +1527,9 @@ static Bool sna_blt_fill_box(struct sna *sna, uint8_t alu, return FALSE; } + if (color == 0) + alu = GXclear; + br13 |= fill_ROP[alu] << 16; switch (bpp) { default: assert(0); @@ -1603,6 +1609,9 @@ Bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu, if (br13 > MAXSHORT) return FALSE; + if (pixel == 0) + alu = GXclear; + br13 |= 1<<31 | fill_ROP[alu] << 16; switch (bpp) { default: assert(0); |