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.
This commit is contained in:
Ell 2020-01-18 12:40:59 +02:00
parent 203bc9d893
commit fcc1c3d380
1 changed files with 6 additions and 0 deletions

View File

@ -608,14 +608,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;
}