diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-28 14:35:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-28 21:18:49 +0000 |
commit | 89038ddb96aabc4bc1f04402b2aca0ce546e8bf3 (patch) | |
tree | 9632a9a2eb30e7754d0b2798926070a1fe3fd639 /src/sna/sna_video.c | |
parent | a0a2faefdefbea63669dfeb49f7e701196ab5631 (diff) |
sna/video: Correct scaling of source offsets
When applying pan and zoom to a mismatched video, it would inevitably
miscompute the origin and scale factors.
Reported-by: Matti Hamalainen <ccr@tnsp.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61610
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video.c')
-rw-r--r-- | src/sna/sna_video.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c index ecf52d21..a0eb0f4e 100644 --- a/src/sna/sna_video.c +++ b/src/sna/sna_video.c @@ -449,9 +449,9 @@ sna_video_copy_data(struct sna *sna, { uint8_t *dst; - DBG(("%s: handle=%d, size=%dx%d [%d], rotation=%d, is-texture=%d\n", + DBG(("%s: handle=%d, size=%dx%d [%d], pitch=[%d,%d] rotation=%d, is-texture=%d\n", __FUNCTION__, frame->bo ? frame->bo->handle : 0, - frame->width, frame->height, frame->size, + frame->width, frame->height, frame->size, frame->pitch[0], frame->pitch[1], video->rotation, video->textured)); DBG(("%s: image=(%d, %d), (%d, %d), source=(%d, %d), (%d, %d)\n", __FUNCTION__, @@ -462,6 +462,8 @@ sna_video_copy_data(struct sna *sna, /* In the common case, we can simply the upload in a single pwrite */ if (video->rotation == RR_Rotate_0 && !video->tiled) { + DBG(("%s: unrotated, untiled fast paths: is-planar?=%d\n", + __FUNCTION__, is_planar_fourcc(frame->id))); if (is_planar_fourcc(frame->id)) { int w = frame->image.x2 - frame->image.x1; int h = frame->image.y2 - frame->image.y1; @@ -508,6 +510,8 @@ sna_video_copy_data(struct sna *sna, return true; } } + + DBG(("%s: source cropped, fallback\n", __FUNCTION__)); } /* copy data, must use GTT so that we keep the overlay uncached */ |