[gimp] app: limit the tile-cache size to G_MAXINT also in the UI
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: limit the tile-cache size to G_MAXINT also in the UI
- Date: Tue, 15 May 2012 00:31:10 +0000 (UTC)
commit 9d1ff75c616de588c33333c78b458d0bee838377
Author: Michael Natterer <mitch gimp org>
Date: Tue May 15 02:29:47 2012 +0200
app: limit the tile-cache size to G_MAXINT also in the UI
and #warning about it in the code until GEGL has a guint64 cache size
property.
app/config/gimpgeglconfig.c | 9 +++++++++
app/gegl/gimp-gegl.c | 4 ++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/config/gimpgeglconfig.c b/app/config/gimpgeglconfig.c
index 856efd8..a1c42ba 100644
--- a/app/config/gimpgeglconfig.c
+++ b/app/config/gimpgeglconfig.c
@@ -147,9 +147,18 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *klass)
else
memory_size = 1 << 30; /* 1GB */
+#ifdef __GNUC__
+#warning limiting tile cache size to G_MAXINT
+#endif
+ memory_size = MIN (memory_size, G_MAXINT);
+
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
+#if 0
0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
+#else
+ 0, MIN (G_MAXINT, GIMP_MAX_MEMSIZE),
+#endif
memory_size,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);
diff --git a/app/gegl/gimp-gegl.c b/app/gegl/gimp-gegl.c
index 9a357d8..176e6d7 100644
--- a/app/gegl/gimp-gegl.c
+++ b/app/gegl/gimp-gegl.c
@@ -48,6 +48,10 @@ gimp_gegl_init (Gimp *gimp)
config = GIMP_GEGL_CONFIG (gimp->config);
+#ifdef __GNUC__
+#warning limiting tile cache size to G_MAXINT
+#endif
+
g_object_set (gegl_config (),
"tile-width", TILE_WIDTH,
"tile-height", TILE_HEIGHT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]