summaryrefslogtreecommitdiff
path: root/src/sna/gen3_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-14 13:08:43 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-14 13:40:55 +0000
commitc64d2572bafeacae25e9b58c8372ce91858c3832 (patch)
tree0c79534b73c4da3bc44f67182bce058fd9b87456 /src/sna/gen3_render.c
parentb61e6398f0cf94d3c483e30c05ceae4a8383d16c (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen3_render.c')
-rw-r--r--src/sna/gen3_render.c4
1 files changed, 2 insertions, 2 deletions
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;