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:
@ -608,14 +608,20 @@ gimp_tile_handler_validate_buffer_set_extent (GeglBuffer *buffer,
|
|||||||
|
|
||||||
g_return_val_if_fail (validate != NULL, FALSE);
|
g_return_val_if_fail (validate != NULL, FALSE);
|
||||||
|
|
||||||
|
validate->suspend_validate++;
|
||||||
|
|
||||||
if (gimp_gegl_buffer_set_extent (buffer, extent))
|
if (gimp_gegl_buffer_set_extent (buffer, extent))
|
||||||
{
|
{
|
||||||
|
validate->suspend_validate--;
|
||||||
|
|
||||||
cairo_region_intersect_rectangle (validate->dirty_region,
|
cairo_region_intersect_rectangle (validate->dirty_region,
|
||||||
(const cairo_rectangle_int_t *) extent);
|
(const cairo_rectangle_int_t *) extent);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate->suspend_validate--;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user