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.
This commit is contained in:
Ell 2019-03-30 12:01:06 -04:00
parent be7906c05c
commit fa31854a66
1 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,8 @@
#include "operations-types.h"
#include "gegl/gimp-gegl-utils.h"
#include "core/gimpdrawable.h"
#include "core/gimpfilloptions.h"
@ -234,10 +236,15 @@ gimp_operation_fill_source_process (GeglOperation *operation,
if (fill_source->options && fill_source->drawable)
{
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);