diff options
author | Bill Spitzak <spitzak@gmail.com> | 2014-05-08 20:00:35 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-05-09 14:03:05 -0700 |
commit | 79b7cb3ee3c9d925c7a50adcd0445b2f4664816c (patch) | |
tree | 0896f2613dac4a165406517fbd6db1d7ca5606d9 | |
parent | 6d43f045e3495b9967a75ae6594ca3415b2661a6 (diff) |
desktop-shell: Fix black edges on scaled desktop pattern
Filter sampling outside the source image can leak black into the edges
of the
desktop image. This is most easily seen by scaling the default tiled image
with this weston.ini:
# no background-image and no background-color
background-type=scale-crop
-rw-r--r-- | clients/desktop-shell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 4880888a..e121cc73 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -724,6 +724,7 @@ background_draw(struct widget *widget, void *data) case BACKGROUND_SCALE: cairo_matrix_init_scale(&matrix, sx, sy); cairo_pattern_set_matrix(pattern, &matrix); + cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); break; case BACKGROUND_SCALE_CROP: s = (sx < sy) ? sx : sy; @@ -733,6 +734,7 @@ background_draw(struct widget *widget, void *data) cairo_matrix_init_translate(&matrix, tx, ty); cairo_matrix_scale(&matrix, s, s); cairo_pattern_set_matrix(pattern, &matrix); + cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); break; case BACKGROUND_TILE: cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT); |