[gimp/wip/tile-damage: 3/4] app: avoid unnecessary invalidation when painting projection synchronously



commit deeba0fd670f6511a93f97cc41254424718d3f66
Author: Ell <ell_se yahoo com>
Date:   Sat Mar 31 11:47:53 2018 -0400

    app: avoid unnecessary invalidation when painting projection synchronously

 app/core/gimpprojection.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index fcf330a..4c86581 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -983,9 +983,6 @@ gimp_projection_paint_area (GimpProjection *proj,
                                 0, 0, width, height,
                                 &x, &y, &w, &h))
     {
-      if (proj->priv->validate_handler)
-        gimp_tile_handler_validate_invalidate (proj->priv->validate_handler,
-                                               GEGL_RECTANGLE (x, y, w, h));
       if (now)
         {
           GeglNode *graph = gimp_projectable_get_graph (proj->priv->projectable);
@@ -997,6 +994,12 @@ gimp_projection_paint_area (GimpProjection *proj,
           gegl_node_blit_buffer (graph, proj->priv->buffer,
                                  GEGL_RECTANGLE (x, y, w, h), 0, GEGL_ABYSS_NONE);
         }
+      else
+        {
+          if (proj->priv->validate_handler)
+            gimp_tile_handler_validate_invalidate (proj->priv->validate_handler,
+                                                   GEGL_RECTANGLE (x, y, w, h));
+        }
 
       /*  add the projectable's offsets because the list of update areas
        *  is in tile-pyramid coordinates, but our external API is always


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