[gimp/gimp-2-10] app: suspend tile validation while setting extent of validate-handler buffer



commit 7b4fba243e8c5394adaee32a2fe5523c4c0c0dca
Author: Ell <ell_se yahoo com>
Date:   Sat Jan 18 12:40:59 2020 +0200

    app: suspend tile validation while setting extent of validate-handler buffer
    
    In gimp_tile_handler_validate_buffer_set_extent(), suspend tile
    validation while calling gimp_gegl_buffer_set_extent(), so that if
    the call triggers clearing of partial tiles, these tiles don't get
    unnecessarily validated.
    
    (cherry picked from commit fcc1c3d380336659300432d7811d6176164085af)

 app/gegl/gimptilehandlervalidate.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/app/gegl/gimptilehandlervalidate.c b/app/gegl/gimptilehandlervalidate.c
index 1041a2c493..fd3e74feda 100644
--- a/app/gegl/gimptilehandlervalidate.c
+++ b/app/gegl/gimptilehandlervalidate.c
@@ -605,14 +605,20 @@ gimp_tile_handler_validate_buffer_set_extent (GeglBuffer          *buffer,
 
   g_return_val_if_fail (validate != NULL, FALSE);
 
+  validate->suspend_validate++;
+
   if (gimp_gegl_buffer_set_extent (buffer, extent))
     {
+      validate->suspend_validate--;
+
       cairo_region_intersect_rectangle (validate->dirty_region,
                                         (const cairo_rectangle_int_t *) extent);
 
       return TRUE;
     }
 
+  validate->suspend_validate--;
+
   return FALSE;
 }
 


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