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>
This commit is contained in:
Chris Wilson 2011-11-29 10:59:48 +00:00
parent 20e5791408
commit d8f2e87473
1 changed files with 8 additions and 4 deletions

View File

@ -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)