[gimp/gimp-2-10] app: implement GimpPickable::flush in GimpGroupLayer



commit a2654ef7ce12b0f421c54523a12aa56572b81750
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.
    
    (cherry picked from commit 7f84f10154790e62cf1ea97a3e97a2dc6b2c49f8)

 app/core/gimpgrouplayer.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 52777f8536..052b64db73 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -183,6 +183,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);
@@ -323,6 +324,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;
 }
 
@@ -1419,6 +1421,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]