summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-29 10:59:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-29 14:14:23 +0000
commitd8f2e87473eae81e07922271b5f608fdceb4ae5e (patch)
treefc4c8f69077767cc007d804b284810543635840d
parent20e57914089d6959529ad222e04853f5ffcb364f (diff)
sna/render: Fix check for "migrate whole pixmap"
The whole pixmap means the sample covers the full width and height, not just either! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_render.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index badde7c1..cf227c6e 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -259,14 +259,18 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
w = box->x2 - box->x1;
h = box->y2 - box->y1;
- if (w == pixmap->drawable.width || h == pixmap->drawable.height) {
- DBG(("%s: migrating whole pixmap (%dx%d) for source\n",
+ if (w == pixmap->drawable.width && h == pixmap->drawable.height) {
+ DBG(("%s: migrating whole pixmap (%dx%d) for source (%d,%d),(%d,%d)\n",
__FUNCTION__,
- pixmap->drawable.width,
- pixmap->drawable.height));
+ pixmap->drawable.width, pixmap->drawable.height,
+ box->x1, box->y1, box->x2, box->y2));
return TRUE;
}
+ /* ignore tiny fractions */
+ if (64*w*h < pixmap->drawable.width * pixmap->drawable.height)
+ return FALSE;
+
count = SOURCE_BIAS;
priv = sna_pixmap(pixmap);
if (priv)