diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-02 13:40:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-02 13:42:35 +0100 |
commit | 5c4dc9c5db7b2a5b936bdbc15536c5cf0f7f5f23 (patch) | |
tree | 347cbe35ff1fd10ea3510fe927146d02287cdca8 /src/sna | |
parent | 0b2651dc04cef8f9692b2557684f044b4980700f (diff) |
sna/gen3+: Fix sampling of borders around gradients
Incurs a slight loss of precision for the internal gradient, but much
more preferable to the artefacts around the borders with RepeatNone.
Reported-by: Clemens Eisserer <linuxhippy@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45016
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/gen3_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen4_render.c | 4 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index e7980962..0478709f 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2137,7 +2137,7 @@ static Bool gen3_gradient_setup(struct sna *sna, channel->pict_format = PICT_a8r8g8b8; channel->card_format = MAPSURF_32BIT | MT_32BIT_ARGB8888; - channel->filter = PictFilterBilinear; + channel->filter = PictFilterNearest; channel->is_affine = sna_transform_is_affine(picture->transform); if (sna_transform_is_integer_translation(picture->transform, &dx, &dy)) { DBG(("%s: integer translation (%d, %d), removing\n", diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 2e78a921..1868e2fb 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -1871,7 +1871,7 @@ gen4_composite_linear_init(struct sna *sna, if (!channel->bo) return 0; - channel->filter = PictFilterBilinear; + channel->filter = PictFilterNearest; channel->repeat = picture->repeat ? picture->repeatType : RepeatNone; channel->width = channel->bo->pitch / 4; channel->height = 1; @@ -1932,7 +1932,7 @@ gen4_composite_linear_init(struct sna *sna, channel->embedded_transform.matrix[0][0] = pixman_double_to_fixed(dx); channel->embedded_transform.matrix[0][1] = pixman_double_to_fixed(dy); - channel->embedded_transform.matrix[0][2] = -pixman_double_to_fixed(dx*(x0+dst_x-x) + dy*(y0+dst_y-y)); + channel->embedded_transform.matrix[0][2] = -pixman_double_to_fixed(dx*(x0+dst_x-x) + dy*(y0+dst_y-y) - .5/sf); channel->embedded_transform.matrix[1][0] = 0; channel->embedded_transform.matrix[1][1] = 0; diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index c27accd7..1fb7f655 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -1904,7 +1904,7 @@ gen5_composite_linear_init(struct sna *sna, if (!channel->bo) return 0; - channel->filter = PictFilterBilinear; + channel->filter = PictFilterNearest; channel->repeat = picture->repeat ? picture->repeatType : RepeatNone; channel->width = channel->bo->pitch / 4; channel->height = 1; diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 3be9195b..5bbe5e3e 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2080,7 +2080,7 @@ gen6_composite_linear_init(struct sna *sna, if (!channel->bo) return 0; - channel->filter = PictFilterBilinear; + channel->filter = PictFilterNearest; channel->repeat = picture->repeat ? picture->repeatType : RepeatNone; channel->width = channel->bo->pitch / 4; channel->height = 1; diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 6917c21e..7dff02fe 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2209,7 +2209,7 @@ gen7_composite_linear_init(struct sna *sna, if (!channel->bo) return 0; - channel->filter = PictFilterBilinear; + channel->filter = PictFilterNearest; channel->repeat = picture->repeat ? picture->repeatType : RepeatNone; channel->width = channel->bo->pitch / 4; channel->height = 1; |