summaryrefslogtreecommitdiff
path: root/src/sna/sna_accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-04-11 18:36:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-04-11 18:36:16 +0100
commit9ae82134ad14085e80d93592e155978a5056f44a (patch)
treeb21ffed9bd3fce6924b21638dc5033d79578b514 /src/sna/sna_accel.c
parent6883f5a64498880425d47871323642409282d9ab (diff)
sna: Restrict WHOLE hint to PutImage on a complete Pixmap
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r--src/sna/sna_accel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8014b5c1..50b46725 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2501,8 +2501,9 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
if (USE_INPLACE &&
(priv->create & KGEM_CAN_CREATE_LARGE ||
((flags & (MOVE_READ | MOVE_ASYNC_HINT)) == 0 &&
- (priv->flush || box_inplace(pixmap, &region->extents))) ||
- (flags & MOVE_WHOLE_HINT && whole_pixmap_inplace(pixmap)))) {
+ (priv->flush ||
+ (flags & MOVE_WHOLE_HINT && whole_pixmap_inplace(pixmap)) ||
+ box_inplace(pixmap, &region->extents))))) {
DBG(("%s: marking for inplace hint (%d, %d)\n",
__FUNCTION__, priv->flush, box_inplace(pixmap, &region->extents)));
flags |= MOVE_INPLACE_HINT;
@@ -4645,7 +4646,9 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
return true;
hint = MOVE_WRITE;
- if (region_is_unclipped(region, w, h) && (h+1)*stride > 65536) {
+ if (region_is_unclipped(region, w, h) &&
+ w == pixmap->drawable.width &&
+ (h+1)*stride > 65536) {
DBG(("%s: segmented, unclipped large upload (%d bytes), marking WHOLE_HINT\n",
__FUNCTION__, h*stride));
hint |= MOVE_WHOLE_HINT;