summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_textured.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-09 10:15:11 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-09 10:26:49 +0000
commitf62b9f94f64f402e731463205635d386386e274e (patch)
tree90eab48d449b52c88f6c5ada765fa6dad898036c /src/sna/sna_video_textured.c
parent5809b1ad934d6e19dbcf00f1b59e156761ec16b6 (diff)
sna/video: Pass cropped source dimensions along with frame data
So pack all the relevant details into the same structure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_textured.c')
-rw-r--r--src/sna/sna_video_textured.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 64d54ec9..3461dc54 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -237,22 +237,20 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
PixmapPtr pixmap = get_drawable_pixmap(drawable);
BoxRec dstBox;
xf86CrtcPtr crtc;
- int top, left, npixels, nlines;
Bool flush = false;
if (!sna_pixmap(pixmap))
return BadAlloc;
- if (!sna_video_clip_helper(scrn, video, &crtc, &dstBox,
+ sna_video_frame_init(sna, video, id, width, height, &frame);
+
+ if (!sna_video_clip_helper(scrn, video, &frame,
+ &crtc, &dstBox,
src_x, src_y, drw_x, drw_y,
src_w, src_h, drw_w, drw_h,
- id,
- &top, &left, &npixels, &nlines,
- clip, width, height))
+ clip))
return Success;
- sna_video_frame_init(sna, video, id, width, height, &frame);
-
if (xvmc_passthrough(id)) {
if (IS_I915G(sna) || IS_I915GM(sna)) {
/* XXX: i915 is not support and needs some
@@ -264,9 +262,7 @@ sna_video_textured_put_image(ScrnInfoPtr scrn,
if (frame.bo == NULL)
return BadAlloc;
} else {
- if (!sna_video_copy_data(sna, video, &frame,
- top, left, npixels, nlines,
- buf))
+ if (!sna_video_copy_data(sna, video, &frame, buf))
return BadAlloc;
}