sna: Drop the MOVE_WHOLE_HINT for PutImage

It is not as clearly beneficial as for GetImage, as for example toolkits
may only push the shadows around a window.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-17 12:28:18 +00:00
parent dc643ef753
commit 0d749f93ea
1 changed files with 5 additions and 16 deletions

View File

@ -3403,8 +3403,6 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
int x, int y, int w, int h, char *bits, int stride)
{
PixmapPtr pixmap = get_drawable_pixmap(drawable);
struct sna *sna = to_sna_from_pixmap(pixmap);
struct sna_pixmap *priv = sna_pixmap(pixmap);
BoxRec *box;
int16_t dx, dy;
int n;
@ -3414,21 +3412,12 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
if (gc->alu != GXcopy)
return false;
if (priv) {
unsigned flags = MOVE_WRITE;
if (w == pixmap->drawable.width) {
flags |= MOVE_WHOLE_HINT;
if (h != pixmap->drawable.height)
flags |= MOVE_READ;
}
if (drawable->depth < 8)
return false;
if (!sna_drawable_move_region_to_cpu(&pixmap->drawable,
region, flags))
return false;
} else {
if (drawable->depth < 8)
return false;
}
if (!sna_drawable_move_region_to_cpu(&pixmap->drawable,
region, MOVE_WRITE))
return false;
get_drawable_deltas(drawable, pixmap, &dx, &dy);
x += dx + drawable->x;