summaryrefslogtreecommitdiff
path: root/src/sna/sna_video_overlay.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_overlay.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_overlay.c')
-rw-r--r--src/sna/sna_video_overlay.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index a20c1112..491baa87 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -467,7 +467,6 @@ sna_video_overlay_put_image(ScrnInfoPtr scrn,
struct sna_video_frame frame;
BoxRec dstBox;
xf86CrtcPtr crtc;
- int top, left, npixels, nlines;
DBG(("%s: src: (%d,%d)(%d,%d), dst: (%d,%d)(%d,%d), width %d, height %d\n",
__FUNCTION__,
@@ -483,15 +482,16 @@ sna_video_overlay_put_image(ScrnInfoPtr scrn,
if (src_h >= (drw_h * 8))
drw_h = src_h / 7;
+ 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;
if (!crtc) {
@@ -502,12 +502,9 @@ sna_video_overlay_put_image(ScrnInfoPtr scrn,
return Success;
}
- sna_video_frame_init(sna, video, id, width, height, &frame);
-
/* overlay can't handle rotation natively, store it for the copy func */
video->rotation = crtc->rotation;
- if (!sna_video_copy_data(sna, video, &frame,
- top, left, npixels, nlines, buf)) {
+ if (!sna_video_copy_data(sna, video, &frame, buf)) {
DBG(("%s: failed to copy video data\n", __FUNCTION__));
return BadAlloc;
}