xf86-video-intel: src/sna/sna_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 23 03:39:41 PST 2012
src/sna/sna_render.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit c67e6a05ff729c0ddb26775e1c8533be1144d85a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 23 11:40:13 2012 +0000
sna: Align the origin of downsampling subregion to an even pixel
In order for us to produce stable downsampled images across multiple
frames, we need to sample the same pairs of pixels every time. This
requires us to align the origin of the sample region to an even pixel.
Reported-by: Clemens Eisserer <linuxhippy at gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=45086
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 5f79e04..4f86137 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -643,6 +643,12 @@ static int sna_render_picture_downsample(struct sna *sna,
oy = v.vector[1] / v.vector[2];
}
+ /* Align the origin to an even pixel so that the sampling of
+ * partial images is stable.
+ */
+ box.x1 &= ~1;
+ box.y1 &= ~1;
+
if (channel->repeat == RepeatNone || channel->repeat == RepeatPad) {
if (box.x1 < 0)
box.x1 = 0;
More information about the xorg-commit
mailing list