[gimp] app: fix the tile pyramid invalidation bug



commit 40f41055b90d1db0fc71ea668a27fae86a9ad0b2
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sat Aug 10 16:22:27 2013 +0200

    app: fix the tile pyramid invalidation bug
    
    when toggling the visibility of a single layer image with
    alpha channel, zoomed at 50%, the projection wasn't
    properly redrawn. It seems there's a GEGL bug exposed
    by normal layer mode operation fast path.

 app/core/gimpprojection.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/app/core/gimpprojection.c b/app/core/gimpprojection.c
index b6bec74..e226445 100644
--- a/app/core/gimpprojection.c
+++ b/app/core/gimpprojection.c
@@ -695,22 +695,19 @@ gimp_projection_paint_area (GimpProjection *proj,
   x2 = CLAMP (x + w, 0, width);
   y2 = CLAMP (y + h, 0, height);
 
+  if (proj->validate_handler)
+    gimp_tile_handler_projection_invalidate (proj->validate_handler,
+                                             x, y, width, height);
   if (now)
     {
       GeglNode *graph = gimp_projectable_get_graph (proj->projectable);
 
-      if (proj->validate_handler)
-        gimp_tile_handler_projection_undo_invalidate (proj->validate_handler,
-                                                      x1, y1, x2 - x1, y2 - y1);
-
       gegl_node_blit_buffer (graph, proj->buffer,
                              GEGL_RECTANGLE (x1, y1, x2 - x1, y2 - y1));
-    }
-  else
-    {
+
       if (proj->validate_handler)
-        gimp_tile_handler_projection_invalidate (proj->validate_handler,
-                                                 x1, y1, x2 - x1, y2 - y1);
+        gimp_tile_handler_projection_undo_invalidate (proj->validate_handler,
+                                                      x1, y1, x2 - x1, y2 - y1);
     }
 
   /*  add the projectable's offsets because the list of update areas


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