diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-05 14:32:13 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-03-16 10:53:29 +0000 |
commit | 910fd171a00227025abc8bcc286a740f5bae895b (patch) | |
tree | b6c26bf1e7192edfec80be6d0b79961dabc3357b /src | |
parent | 753914acc31947df8e9f2fa3b9c39de745098709 (diff) |
i830: Remove coord-adjust for nearest centre-sampling.
Fixes a number of cairo test suite failures.
Also affects:
Bug 16917 - Blur on y-axis also when only x-axis is scaled bilinear
http://bugs.freedesktop.org/show_bug.cgi?id=16917
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_render.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/i830_render.c b/src/i830_render.c index 89e5acb6..0d6a8034 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -451,16 +451,7 @@ i830_prepare_composite(int op, PicturePtr source_picture, if (!i830_get_dest_format(dest_picture, &intel->render_dest_format)) return FALSE; - intel->dst_coord_adjust = 0; - intel->src_coord_adjust = 0; - intel->mask_coord_adjust = 0; - if (source_picture->filter == PictFilterNearest) - intel->src_coord_adjust = 0.375; - if (mask != NULL) { - intel->mask_coord_adjust = 0; - if (mask_picture->filter == PictFilterNearest) - intel->mask_coord_adjust = 0.375; - } else { + if (mask) { intel->transform[1] = NULL; intel->scale_units[1][0] = -1; intel->scale_units[1][1] = -1; @@ -658,8 +649,7 @@ i830_emit_composite_primitive(PixmapPtr dest, per_vertex = 2; /* dest x/y */ { - float x = srcX + intel->src_coord_adjust; - float y = srcY + intel->src_coord_adjust; + float x = srcX, y = srcY; is_affine_src = i830_transform_is_affine(intel->transform[0]); if (is_affine_src) { @@ -715,8 +705,7 @@ i830_emit_composite_primitive(PixmapPtr dest, } if (intel->render_mask) { - float x = maskX + intel->mask_coord_adjust; - float y = maskY + intel->mask_coord_adjust; + float x = maskX, y = maskY; is_affine_mask = i830_transform_is_affine(intel->transform[1]); if (is_affine_mask) { @@ -776,8 +765,8 @@ i830_emit_composite_primitive(PixmapPtr dest, ATOMIC_BATCH(1 + num_floats); OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats - 1)); - OUT_BATCH_F(intel->dst_coord_adjust + dstX + w); - OUT_BATCH_F(intel->dst_coord_adjust + dstY + h); + OUT_BATCH_F(dstX + w); + OUT_BATCH_F(dstY + h); OUT_BATCH_F(src_x[2] / intel->scale_units[0][0]); OUT_BATCH_F(src_y[2] / intel->scale_units[0][1]); if (!is_affine_src) { @@ -791,8 +780,8 @@ i830_emit_composite_primitive(PixmapPtr dest, } } - OUT_BATCH_F(intel->dst_coord_adjust + dstX); - OUT_BATCH_F(intel->dst_coord_adjust + dstY + h); + OUT_BATCH_F(dstX); + OUT_BATCH_F(dstY + h); OUT_BATCH_F(src_x[1] / intel->scale_units[0][0]); OUT_BATCH_F(src_y[1] / intel->scale_units[0][1]); if (!is_affine_src) { @@ -806,8 +795,8 @@ i830_emit_composite_primitive(PixmapPtr dest, } } - OUT_BATCH_F(intel->dst_coord_adjust + dstX); - OUT_BATCH_F(intel->dst_coord_adjust + dstY); + OUT_BATCH_F(dstX); + OUT_BATCH_F(dstY); OUT_BATCH_F(src_x[0] / intel->scale_units[0][0]); OUT_BATCH_F(src_y[0] / intel->scale_units[0][1]); if (!is_affine_src) { |