buffer: avoid over-trimming cache if already trimmed
In gegl_tile_handler_cache_trim(), check if the cache needs trimming before deciding how much to over-trim, and bail if no trimming is needed in the first place. This is necessary, since two threads may try to trim the cache concurrently, in which case one thread will block until the other thread finishes trimming. At this point, we want the other thread to avoid trimming, instead of increasing the over-trim ratio, and trimming extra tiles.
Showing with 9 additions and 1 deletion