diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-21 22:43:04 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-21 22:43:04 +0000 |
commit | 1de1104064b5898cbed37e836901694a381c1266 (patch) | |
tree | ebe78aa532a466b51f4164b24d2188df189075ff | |
parent | 2c0aacb869bea34620a2b0029ddfa7f2a9513dc7 (diff) |
sna: Use a hint to do whole image uploads inplace
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 6d978146..0dac5611 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4540,6 +4540,7 @@ 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); + unsigned int hint; BoxRec *box; int16_t dx, dy; int n; @@ -4562,8 +4563,11 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region, if (try_upload_tiled_x(pixmap, region, x, y, w, h, bits, stride)) return true; - if (!sna_drawable_move_region_to_cpu(&pixmap->drawable, - region, MOVE_WRITE)) + hint = MOVE_WRITE; + if (w == pixmap->drawable.width) + hint |= MOVE_WHOLE_HINT; + + if (!sna_drawable_move_region_to_cpu(&pixmap->drawable, region, hint)) return false; if (sigtrap_get()) |