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:
@ -147,9 +147,18 @@ gimp_gegl_config_class_init (GimpGeglConfigClass *klass)
|
|||||||
else
|
else
|
||||||
memory_size = 1 << 30; /* 1GB */
|
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,
|
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
|
||||||
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
|
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
|
||||||
|
#if 0
|
||||||
0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
|
0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
|
||||||
|
#else
|
||||||
|
0, MIN (G_MAXINT, GIMP_MAX_MEMSIZE),
|
||||||
|
#endif
|
||||||
memory_size,
|
memory_size,
|
||||||
GIMP_PARAM_STATIC_STRINGS |
|
GIMP_PARAM_STATIC_STRINGS |
|
||||||
GIMP_CONFIG_PARAM_CONFIRM);
|
GIMP_CONFIG_PARAM_CONFIRM);
|
||||||
|
@ -48,6 +48,10 @@ gimp_gegl_init (Gimp *gimp)
|
|||||||
|
|
||||||
config = GIMP_GEGL_CONFIG (gimp->config);
|
config = GIMP_GEGL_CONFIG (gimp->config);
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#warning limiting tile cache size to G_MAXINT
|
||||||
|
#endif
|
||||||
|
|
||||||
g_object_set (gegl_config (),
|
g_object_set (gegl_config (),
|
||||||
"tile-width", TILE_WIDTH,
|
"tile-width", TILE_WIDTH,
|
||||||
"tile-height", TILE_HEIGHT,
|
"tile-height", TILE_HEIGHT,
|
||||||
|
Reference in New Issue
Block a user