[gegl] path-stroke: make it threadsafe by not having a static cache buffer
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] path-stroke: make it threadsafe by not having a static cache buffer
- Date: Fri, 17 Dec 2010 15:40:59 +0000 (UTC)
commit 5518ab49210d298bca13688222d947c668332fec
Author: �yvind Kolås <pippin gimp org>
Date: Fri Dec 17 15:29:56 2010 +0000
path-stroke: make it threadsafe by not having a static cache buffer
gegl/property-types/gegl-path.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index 677f4fa..16def64 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -2035,9 +2035,9 @@ static void gegl_path_stamp (GeglBuffer *buffer,
gdouble opacity)
{
gfloat col[4];
- static StampStatic s = {FALSE,}; /* XXX:
- we will ultimately leak the last valid
- cached brush. */
+ StampStatic s = {FALSE,}; /* there should be a cache of stamps,
+ note that stamps are accessed in multiple threads
+ */
GeglRectangle temp;
GeglRectangle roi;
@@ -2110,6 +2110,7 @@ static void gegl_path_stamp (GeglBuffer *buffer,
}
}
gegl_buffer_set_unlocked (buffer, &roi, s.format, s.buf, 0);
+ g_free (s.buf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]