summaryrefslogtreecommitdiff
path: root/src/sna/gen7_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-05-15 23:00:53 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-05-16 10:02:16 +0100
commite73d51247be5018fe53346f991e2f178c917cb13 (patch)
tree5e97d41d8dc68b6e446a0ab91fbb98c14150f5ba /src/sna/gen7_render.c
parent10c18b1a4631ebab5508f4308c73129f2111e964 (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/gen7_render.c')
-rw-r--r--src/sna/gen7_render.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 8d32c3e1..2e1682cb 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1828,6 +1828,7 @@ gen7_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;
@@ -1835,7 +1836,6 @@ gen7_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;
@@ -1848,10 +1848,7 @@ gen7_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;