diff --git a/app/config/gimpgeglconfig.c b/app/config/gimpgeglconfig.c index e76bd0ed26..e9d9edb16b 100644 --- a/app/config/gimpgeglconfig.c +++ b/app/config/gimpgeglconfig.c @@ -147,18 +147,9 @@ 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 4280e15cc2..027de2393d 100644 --- a/app/gegl/gimp-gegl.c +++ b/app/gegl/gimp-gegl.c @@ -47,24 +47,33 @@ gimp_gegl_init (Gimp *gimp) config = GIMP_GEGL_CONFIG (gimp->config); -#ifdef __GNUC__ -#warning limiting tile cache size to G_MAXINT -#endif - #ifdef __GNUC__ #warning not setting GeglConfig:threads #endif - g_object_set (gegl_config (), + if (g_object_class_find_property (G_OBJECT_GET_CLASS (gegl_config ()), + "tile-cache-size")) + { + g_object_set (gegl_config (), + "cache-size", (guint64) config->tile_cache_size, #if 0 - "tile-width", TILE_WIDTH, - "tile-height", TILE_HEIGHT, + "threads", config->num_processors, #endif - "cache-size", (gint) MIN (config->tile_cache_size, G_MAXINT), + NULL); + } + else + { +#ifdef __GNUC__ +#warning limiting tile cache size to G_MAXINT +#endif + + g_object_set (gegl_config (), + "cache-size", (gint) MIN (config->tile_cache_size, G_MAXINT), #if 0 - "threads", config->num_processors, + "threads", config->num_processors, #endif - NULL); + NULL); + } /* turn down the precision of babl - permitting use of lookup tables for * gamma conversions, this precision is anyways high enough for both 8bit