[gimp] app: flush both write and write buffer in gimp_drawable_update()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: flush both write and write buffer in gimp_drawable_update()
- Date: Wed, 2 May 2012 16:04:12 +0000 (UTC)
commit acad9ac510f4e67cb1f2d8b8c4f77cb9810db923
Author: Michael Natterer <mitch gimp org>
Date: Sat Mar 17 12:40:34 2012 +0100
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.
app/core/gimpdrawable.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 13ee25a..97435f7 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -747,8 +747,7 @@ gimp_drawable_real_update (GimpDrawable *drawable,
{
if (drawable->private->tile_source_node)
{
- GObject *operation = NULL;
- GeglBuffer *buffer = NULL;
+ GObject *operation = NULL;
g_object_get (drawable->private->tile_source_node,
"gegl-operation", &operation,
@@ -766,16 +765,6 @@ gimp_drawable_real_update (GimpDrawable *drawable,
gegl_operation_invalidate (GEGL_OPERATION (operation), &rect, FALSE);
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));
@@ -1267,6 +1256,9 @@ gimp_drawable_update (GimpDrawable *drawable,
if (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,
x, y, width, height);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]