summaryrefslogtreecommitdiff
path: root/glamor/glamor_xv.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-07-02 12:40:05 -0700
committerEric Anholt <eric@anholt.net>2015-07-10 09:42:58 -0700
commitb51e079e1877411fde72372c3953d71e42ac1d6e (patch)
treefa8cad47718105c94fca26b2661c3d92b5572a51 /glamor/glamor_xv.c
parent1bd966d16d87ed908547144c68850f2cdee05469 (diff)
glamor: Use the new upload/download interface for XV uploads.
We don't need any of its weird handling of picture formats, since our XV pixmaps don't have any pictures attached. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'glamor/glamor_xv.c')
-rw-r--r--glamor/glamor_xv.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c
index 364104ddd..85e652832 100644
--- a/glamor/glamor_xv.c
+++ b/glamor/glamor_xv.c
@@ -37,6 +37,7 @@
#endif
#include "glamor_priv.h"
+#include "glamor_transfer.h"
#include <X11/extensions/Xv.h>
#include "../hw/xfree86/common/fourcc.h"
@@ -410,6 +411,7 @@ glamor_xv_put_image(glamor_port_private *port_priv,
int srcPitch, srcPitch2;
int top, nlines;
int s2offset, s3offset, tmp;
+ BoxRec full_box, half_box;
s2offset = s3offset = srcPitch2 = 0;
@@ -452,20 +454,28 @@ glamor_xv_put_image(glamor_port_private *port_priv,
s2offset = s3offset;
s3offset = tmp;
}
- glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[0],
- 0, 0, width, nlines,
- srcPitch,
- buf + (top * srcPitch), 0);
-
- glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[1],
- 0, 0, width >> 1, (nlines + 1) >> 1,
- srcPitch2,
- buf + s2offset, 0);
-
- glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[2],
- 0, 0, width >> 1, (nlines + 1) >> 1,
- srcPitch2,
- buf + s3offset, 0);
+
+ full_box.x1 = 0;
+ full_box.y1 = 0;
+ full_box.x2 = width;
+ full_box.y2 = nlines;
+
+ half_box.x1 = 0;
+ half_box.y1 = 0;
+ half_box.x2 = width >> 1;
+ half_box.y2 = (nlines + 1) >> 1;
+
+ glamor_upload_boxes(port_priv->src_pix[0], &full_box, 1,
+ 0, 0, 0, 0,
+ buf + (top * srcPitch), srcPitch);
+
+ glamor_upload_boxes(port_priv->src_pix[1], &half_box, 1,
+ 0, 0, 0, 0,
+ buf + s2offset, srcPitch2);
+
+ glamor_upload_boxes(port_priv->src_pix[2], &half_box, 1,
+ 0, 0, 0, 0,
+ buf + s3offset, srcPitch2);
break;
default:
return BadMatch;