exynos: honor the repeat mode in g2d_copy_with_scale

This is useful when the default repeat mode, which is 'repeat'
produces artifacts at the borders of the copied image.
Choose the 'pad' mode to make use of the color of the destination
image.

In my usage case the destination is the framebuffer, which is
solid filled with a background color. Scaling with 'pad' mode
would then just do the right thing and also produces nice
borders on the output.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
main
Tobias Jakobi 2015-03-11 20:38:42 +01:00 committed by Emil Velikov
parent 03c9cccfa0
commit 89037326ca
1 changed files with 5 additions and 0 deletions

View File

@ -462,6 +462,11 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
g2d_add_cmd(ctx, SRC_SELECT_REG, G2D_SELECT_MODE_NORMAL);
g2d_add_cmd(ctx, SRC_COLOR_MODE_REG, src->color_mode);
g2d_add_cmd(ctx, SRC_REPEAT_MODE_REG, src->repeat_mode);
if (src->repeat_mode == G2D_REPEAT_MODE_PAD)
g2d_add_cmd(ctx, SRC_PAD_VALUE_REG, dst->color);
g2d_add_base_addr(ctx, src, g2d_src);
g2d_add_cmd(ctx, SRC_STRIDE_REG, src->stride);