summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-17 12:28:18 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-17 13:11:08 +0000
commit0d749f93ea52161e59da1adca1a22e96ba293551 (patch)
tree71871454a5af599cf087fa259d9bfcef58aad06a
parentdc643ef753bcfb69685f1eb10828d0c8f830c30e (diff)
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>
-rw-r--r--src/sna/sna_accel.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index e4852487..1e6289d3 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -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;