diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-15 23:00:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-16 10:02:16 +0100 |
commit | e73d51247be5018fe53346f991e2f178c917cb13 (patch) | |
tree | 5e97d41d8dc68b6e446a0ab91fbb98c14150f5ba /src/sna/gen8_render.c | |
parent | 10c18b1a4631ebab5508f4308c73129f2111e964 (diff) |
sna/video: Only migrate the destination window
By using move-area-to-gpu and specifying that we overwrite the target
area, we can optimize away any needless damage migration.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r-- | src/sna/gen8_render.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 0b7979e1..bda37002 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -3644,6 +3644,7 @@ gen8_render_video(struct sna *sna, PixmapPtr pixmap) { struct sna_composite_op tmp; + struct sna_pixmap *priv = sna_pixmap(pixmap); int dst_width = dstRegion->extents.x2 - dstRegion->extents.x1; int dst_height = dstRegion->extents.y2 - dstRegion->extents.y1; int src_width = frame->src.x2 - frame->src.x1; @@ -3651,7 +3652,6 @@ gen8_render_video(struct sna *sna, float src_offset_x, src_offset_y; float src_scale_x, src_scale_y; int nbox, pix_xoff, pix_yoff; - struct sna_pixmap *priv; unsigned filter; BoxPtr box; @@ -3664,10 +3664,7 @@ gen8_render_video(struct sna *sna, REGION_EXTENTS(NULL, dstRegion)->x2, REGION_EXTENTS(NULL, dstRegion)->y2)); - priv = sna_pixmap_force_to_gpu(pixmap, MOVE_READ | MOVE_WRITE); - if (priv == NULL) - return false; - + assert(priv->gpu_bo); memset(&tmp, 0, sizeof(tmp)); tmp.dst.pixmap = pixmap; |