Commit 43681a6d authored by Alexia Death's avatar Alexia Death

app: flush blur cache and other caches when invalid

parent b65b996f
......@@ -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
......
......@@ -366,6 +366,11 @@ gimp_brush_core_pre_paint (GimpPaintCore *paint_core,
&last_coords,
&current_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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment