app: flush both write and write buffer in gimp_drawable_update()
so tiles and buffers are up-to-date before anyone has a chance to access the modified pixels.
This commit is contained in:
@ -747,8 +747,7 @@ gimp_drawable_real_update (GimpDrawable *drawable,
|
|||||||
{
|
{
|
||||||
if (drawable->private->tile_source_node)
|
if (drawable->private->tile_source_node)
|
||||||
{
|
{
|
||||||
GObject *operation = NULL;
|
GObject *operation = NULL;
|
||||||
GeglBuffer *buffer = NULL;
|
|
||||||
|
|
||||||
g_object_get (drawable->private->tile_source_node,
|
g_object_get (drawable->private->tile_source_node,
|
||||||
"gegl-operation", &operation,
|
"gegl-operation", &operation,
|
||||||
@ -766,16 +765,6 @@ gimp_drawable_real_update (GimpDrawable *drawable,
|
|||||||
gegl_operation_invalidate (GEGL_OPERATION (operation), &rect, FALSE);
|
gegl_operation_invalidate (GEGL_OPERATION (operation), &rect, FALSE);
|
||||||
g_object_unref (operation);
|
g_object_unref (operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
gegl_node_get (drawable->private->tile_source_node,
|
|
||||||
"buffer", &buffer,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (buffer)
|
|
||||||
{
|
|
||||||
gimp_gegl_buffer_refetch_tiles (buffer);
|
|
||||||
g_object_unref (buffer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (drawable));
|
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (drawable));
|
||||||
@ -1267,6 +1256,9 @@ gimp_drawable_update (GimpDrawable *drawable,
|
|||||||
if (drawable->private->write_buffer)
|
if (drawable->private->write_buffer)
|
||||||
gegl_buffer_flush (drawable->private->write_buffer);
|
gegl_buffer_flush (drawable->private->write_buffer);
|
||||||
|
|
||||||
|
if (drawable->private->read_buffer)
|
||||||
|
gimp_gegl_buffer_refetch_tiles (drawable->private->read_buffer);
|
||||||
|
|
||||||
g_signal_emit (drawable, gimp_drawable_signals[UPDATE], 0,
|
g_signal_emit (drawable, gimp_drawable_signals[UPDATE], 0,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user