From fa31854a66f5317867a8dbe2137969444ad59c93 Mon Sep 17 00:00:00 2001 From: Ell Date: Sat, 30 Mar 2019 12:01:06 -0400 Subject: [PATCH] app: in gimp:fill-source, align result to tile grid In gimp:fill-source, align the result rect to the drawable buffer's tile grid, so that all tiles are COWed for solid-color fills. --- app/operations/gimpoperationfillsource.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/operations/gimpoperationfillsource.c b/app/operations/gimpoperationfillsource.c index 1e285202ab..c2a798fd06 100644 --- a/app/operations/gimpoperationfillsource.c +++ b/app/operations/gimpoperationfillsource.c @@ -26,6 +26,8 @@ #include "operations-types.h" +#include "gegl/gimp-gegl-utils.h" + #include "core/gimpdrawable.h" #include "core/gimpfilloptions.h" @@ -233,11 +235,16 @@ gimp_operation_fill_source_process (GeglOperation *operation, if (fill_source->options && fill_source->drawable) { - GeglBuffer *buffer; + GeglBuffer *buffer; + GeglRectangle rect; + + gimp_gegl_rectangle_align_to_tile_grid ( + &rect, result, + gimp_drawable_get_buffer (fill_source->drawable)); buffer = gimp_fill_options_create_buffer (fill_source->options, fill_source->drawable, - result, + &rect, fill_source->pattern_offset_x, fill_source->pattern_offset_y);