[gimp] app: implement GimpPickable::flush in GimpGroupLayer



commit 7f84f10154790e62cf1ea97a3e97a2dc6b2c49f8
Author: Ell <ell_se yahoo com>
Date:   Wed Jan 15 22:02:10 2020 +0200

    app: implement GimpPickable::flush in GimpGroupLayer
    
    ... by synchronously flushing the group's projection.  This is
    necessary for pass-through groups, since their projection is
    normally flushed asynchronously.

 app/core/gimpgrouplayer.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 17fd4ca03f..570c685d81 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -184,6 +184,7 @@ static GeglNode      * gimp_group_layer_get_graph    (GimpProjectable *projectab
 static void            gimp_group_layer_begin_render (GimpProjectable *projectable);
 static void            gimp_group_layer_end_render   (GimpProjectable *projectable);
 
+static void          gimp_group_layer_pickable_flush (GimpPickable    *pickable);
 static gdouble       gimp_group_layer_get_opacity_at (GimpPickable    *pickable,
                                                       gint             x,
                                                       gint             y);
@@ -324,6 +325,7 @@ gimp_projectable_iface_init (GimpProjectableInterface *iface)
 static void
 gimp_pickable_iface_init (GimpPickableInterface *iface)
 {
+  iface->flush          = gimp_group_layer_pickable_flush;
   iface->get_opacity_at = gimp_group_layer_get_opacity_at;
 }
 
@@ -1423,6 +1425,14 @@ gimp_group_layer_end_render (GimpProjectable *projectable)
     }
 }
 
+static void
+gimp_group_layer_pickable_flush (GimpPickable *pickable)
+{
+  GimpGroupLayerPrivate *private = GET_PRIVATE (pickable);
+
+  gimp_pickable_flush (GIMP_PICKABLE (private->projection));
+}
+
 static gdouble
 gimp_group_layer_get_opacity_at (GimpPickable *pickable,
                                  gint          x,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]