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.
This commit is contained in:
Michael Natterer
2012-05-15 02:29:47 +02:00
parent ede421bd45
commit 9d1ff75c61
2 changed files with 13 additions and 0 deletions

View File

@ -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);

View File

@ -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,