[gimp] app: plug a memory leak
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: plug a memory leak
- Date: Wed, 19 Sep 2012 17:13:13 +0000 (UTC)
commit a0221bc5602d6b749f78f62768cd6cee3999678d
Author: Massimo Valentini <mvalentini src gnome org>
Date: Wed Sep 19 19:09:44 2012 +0200
app: plug a memory leak
and make the blend tool (Shape: Shaped (angular)) sligthly
more efficient
with an opaque layer (400x300) goes from:
gradient_fill_region: gradient_fill_region took 52.69 seconds
EEEEeEeek! 2 GeglBuffers leaked
to:
gradient_fill_region: gradient_fill_region took 5.90 seconds
app/core/gimpdrawable-blend.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c
index cbbb48c..299a2fb 100644
--- a/app/core/gimpdrawable-blend.c
+++ b/app/core/gimpdrawable-blend.c
@@ -550,10 +550,13 @@ gradient_precalc_shapeburst (GimpImage *image,
region->width, region->height),
babl_format ("Y float"));
- /* allocate the selection mask copy */
+ /* allocate the selection mask copy
+ * XXX: its format should be the same of gimp:shapeburst input buffer
+ * porting the op to 'float' should be reflected here as well
+ */
temp_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
region->width, region->height),
- gimp_image_get_mask_format (image));
+ babl_format ("Y u8"));
mask = gimp_image_get_mask (image);
@@ -579,8 +582,7 @@ gradient_precalc_shapeburst (GimpImage *image,
{
const Babl *component_format;
- component_format =
- gimp_image_get_component_format (image, GIMP_ALPHA_CHANNEL);
+ component_format = babl_format ("A u8");
/* extract the aplha into the temp mask */
gegl_buffer_set_format (temp_buffer, component_format);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]