summaryrefslogtreecommitdiff
path: root/src/sna/fb
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-08-19 09:48:05 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-08-19 10:17:21 +0100
commit13d1a105159222518800d3c5ad5660725864ec6b (patch)
treed3933cd2da8e9d1398cd3f6b0cb90fe7129ea913 /src/sna/fb
parenta13781d19defc97af6a279c11a85e33ef825020e (diff)
sna: compare the correct trailing dword when skipping identical bitmap lines
Fixes regression in 2.20.4 from commit 85192f00e345830541e3715e211b1f98154bbef4 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Aug 8 12:11:50 2012 +0100 sna: Ignore trailing bits when comparing lines inside the bitmap Reported-by: Edward Sheldrake <ejsheldrake@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53699 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/fb')
-rw-r--r--src/sna/fb/fbbitmap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sna/fb/fbbitmap.c b/src/sna/fb/fbbitmap.c
index bba6ea3e..7c037fe3 100644
--- a/src/sna/fb/fbbitmap.c
+++ b/src/sna/fb/fbbitmap.c
@@ -88,9 +88,7 @@ fbBitmapToRegion(PixmapPtr pixmap)
line += stride;
while (y2 < pixmap->drawable.height &&
memcmp(bits, line, width >> 3) == 0 &&
- (maskw == 0 ||
- (bits[width >> (FB_SHIFT - 3)] & maskw) ==
- (line[width >> (FB_SHIFT - 3)] & maskw)))
+ (maskw == 0 || (bits[width >> FB_SHIFT] & maskw) == (line[width >> FB_SHIFT] & maskw)))
line += stride, y2++;
if (READ(bits) & MASK_0)