From c64d2572bafeacae25e9b58c8372ce91858c3832 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 14 Mar 2014 13:08:43 +0000 Subject: sna: Allow some leeway when deciding to discard common translations Under PictFilterNearest, we can ignore fractional translations (not all renderers discard those.) And if we are being approximate, we can loosen our tolerance as well. Signed-off-by: Chris Wilson --- src/sna/gen3_render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sna/gen3_render.c') diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 69f46684..bb98bebc 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2859,7 +2859,7 @@ static bool gen3_gradient_setup(struct sna *sna, channel->card_format = MAPSURF_32BIT | MT_32BIT_ARGB8888; channel->filter = PictFilterNearest; channel->is_affine = sna_transform_is_affine(picture->transform); - if (sna_transform_is_integer_translation(picture->transform, &dx, &dy)) { + if (sna_transform_is_imprecise_integer_translation(picture->transform, PictFilterNearest, false, &dx, &dy)) { DBG(("%s: integer translation (%d, %d), removing\n", __FUNCTION__, dx, dy)); ox += dx; @@ -3086,7 +3086,7 @@ gen3_composite_picture(struct sna *sna, x += dx + picture->pDrawable->x; y += dy + picture->pDrawable->y; - if (sna_transform_is_integer_translation(picture->transform, &dx, &dy)) { + if (sna_transform_is_imprecise_integer_translation(picture->transform, picture->filter, precise, &dx, &dy)) { DBG(("%s: integer translation (%d, %d), removing\n", __FUNCTION__, dx, dy)); x += dx; -- cgit v1.2.3