diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-20 13:36:50 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-20 13:36:50 +0000 |
commit | 01ce7efe73538047abd38bbbb95fc4012ebeb9b4 (patch) | |
tree | 8a43e1bea40e20f1a5efd5f5c9d472c3ca565a3d | |
parent | c27e6306e86797553351a71e2917a9b1158ec388 (diff) |
sna: Fix Drawable offsets prior to performing shadow discard
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 59207695..baf5f609 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2704,6 +2704,13 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, return _sna_pixmap_move_to_cpu(pixmap, flags); } + assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); + + if (get_drawable_deltas(drawable, pixmap, &dx, &dy)) { + DBG(("%s: delta=(%d, %d)\n", __FUNCTION__, dx, dy)); + RegionTranslate(region, dx, dy); + } + if (priv->move_to_gpu) { DBG(("%s: applying move-to-gpu override\n", __FUNCTION__)); if ((flags & MOVE_READ) == 0) @@ -2714,13 +2721,6 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, } } - assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); - - if (get_drawable_deltas(drawable, pixmap, &dx, &dy)) { - DBG(("%s: delta=(%d, %d)\n", __FUNCTION__, dx, dy)); - RegionTranslate(region, dx, dy); - } - if (operate_inplace(priv, flags) && region_inplace(sna, pixmap, region, priv, flags) && sna_pixmap_create_mappable_gpu(pixmap, false)) { |