[gimp] app: flush blur cache and other caches when invalid
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: flush blur cache and other caches when invalid
- Date: Tue, 29 Nov 2016 19:26:03 +0000 (UTC)
commit 43681a6d4cbca3260cc22821a80eeeec26288e7b
Author: Alexia Death <alexiadeath gmail com>
Date: Tue Nov 29 21:25:02 2016 +0200
app: flush blur cache and other caches when invalid
app/core/gimpbrush.c | 10 ++++++++++
app/paint/gimpbrushcore.c | 11 +++++------
2 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index 05bd3b6..6fd8ca9 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -937,6 +937,16 @@ gimp_brush_flush_blur_caches (GimpBrush *brush)
gimp_temp_buf_unref (brush->priv->blured_pixmap);
brush->priv->blured_pixmap = NULL;
}
+
+ if (brush->priv->mask_cache)
+ gimp_brush_cache_clear (brush->priv->mask_cache);
+
+ if (brush->priv->pixmap_cache)
+ gimp_brush_cache_clear (brush->priv->pixmap_cache);
+
+ if (brush->priv->boundary_cache)
+ gimp_brush_cache_clear (brush->priv->boundary_cache);
+
}
gdouble
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 7baef54..c6f0ad0 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -366,6 +366,11 @@ gimp_brush_core_pre_paint (GimpPaintCore *paint_core,
&last_coords,
¤t_coords);
}
+ if ((! GIMP_IS_BRUSH_GENERATED(core->main_brush)) &&
+ (paint_options->brush_hardness != gimp_brush_get_blur_hardness(core->main_brush)))
+ {
+ gimp_brush_flush_blur_caches(core->main_brush);
+ }
}
return TRUE;
@@ -414,12 +419,6 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
return FALSE;
}
- if ((! GIMP_IS_BRUSH_GENERATED(core->main_brush)) &&
- (core->hardness != gimp_brush_get_blur_hardness(core->main_brush)))
- {
- gimp_brush_flush_blur_caches(core->main_brush);
- }
-
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_transforming_brush)
{
gimp_brush_core_eval_transform_dynamics (core,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]