Commit d8c0368a authored by Ell's avatar Ell

app: avoid re-rendering group layers upon resizing

Make sure we don't unnecessarily update the group layer's drawable
while flusing the group's projection during resizing, since we want
to either update the entire drawable, or avoid any updates, when
replacing the drawable's buffer.  Note that explicitly supressing
updates in this case should theoretically not be necessary, but the
fact that the call to gimp_projectable_bounds_changed() can result
in reconstructing the projection (see the FIXME comment in that
function) makes it necessary in some cases nonetheless.

(cherry picked from commit bd726c96)
parent 5eaa2f90
......@@ -62,8 +62,9 @@ struct _GimpGroupLayerPrivate
gint suspend_mask;
GeglBuffer *suspended_mask_buffer;
GeglRectangle suspended_mask_bounds;
gint transforming;
gint direct_update;
gint suspend_update;
gint transforming;
gboolean expanded;
gboolean pass_through;
......@@ -1954,8 +1955,16 @@ gimp_group_layer_update_size (GimpGroupLayer *group)
old_x, old_y, old_width, old_height);
/* avoid updating the drawable in response to projection updates while
* flushing the projection, since we want to either update the entire
* drawable, or not update at all, when setting the drawable's buffer.
gimp_group_layer_flush (group);
buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (private->projection));
gimp_drawable_set_buffer_full (GIMP_DRAWABLE (group),
......@@ -2171,6 +2180,9 @@ gimp_group_layer_proj_update (GimpProjection *proj,
GimpGroupLayerPrivate *private = GET_PRIVATE (group);
if (private->suspend_update)
#if 0
g_printerr ("%s (%s) %d, %d (%d, %d)\n",
G_STRFUNC, gimp_object_get_name (group),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment