From 13d1a105159222518800d3c5ad5660725864ec6b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 19 Aug 2012 09:48:05 +0100 Subject: sna: compare the correct trailing dword when skipping identical bitmap lines Fixes regression in 2.20.4 from commit 85192f00e345830541e3715e211b1f98154bbef4 Author: Chris Wilson Date: Wed Aug 8 12:11:50 2012 +0100 sna: Ignore trailing bits when comparing lines inside the bitmap Reported-by: Edward Sheldrake Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53699 Signed-off-by: Chris Wilson --- src/sna/fb/fbbitmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/sna/fb') 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) -- cgit v1.2.3