diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-31 10:37:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-31 10:37:43 +0000 |
commit | b4ab412cb3eb8d37a33f5eeae5c613090ad2df0f (patch) | |
tree | c1c7ecee925e7ba4571125bda39e5f5f260d1bf8 | |
parent | 088728ad26c7efc2d65b97ff22d526c65a0fa442 (diff) |
sna/blt: Optimise fill with GXcopy and pixel==0 to a GXclear
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_blt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 2ae4ac06..ae24e625 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -142,6 +142,8 @@ static bool sna_blt_fill_init(struct sna *sna, if (alu == GXclear) pixel = 0; + if (alu == GXcopy && pixel == 0) + alu = GXclear; blt->br13 = 1<<31 | (fill_ROP[alu] << 16) | pitch; switch (bpp) { @@ -1612,6 +1614,8 @@ Bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu, if (alu == GXclear) pixel = 0; + if (alu == GXcopy && pixel == 0) + alu = GXclear; br13 |= 1<<31 | fill_ROP[alu] << 16; switch (bpp) { |