sna: Only discard READ hint for TearFree copy iff it subsumes the pixmap
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Dec 2013 10:49:56 +0000 (10:49 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Dec 2013 10:51:28 +0000 (10:51 +0000)
Remembering that the target window may be smaller than its backing
pixmap.

Reported-by: Andreas Klauer <Andreas.Klauer@metamorpher.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72430
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_accel.c

index c11e2cc..f7da098 100644 (file)
@@ -3518,7 +3518,7 @@ use_gpu_bo:
                if (flags & IGNORE_CPU) {
                        region.extents = *box;
                        region.data = NULL;
-                       if (region_subsumes_drawable(&region, drawable))
+                       if (region_subsumes_drawable(&region, &pixmap->drawable))
                                hint = MOVE_WRITE;
                }