Commit f2a9ffdd authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/app.c set the GEGL cache size as large as the GIMP tile-cache.

2008-11-16  Sven Neumann  <sven@gimp.org>

	* app/app.c
	* app/gegl/gimp-gegl.[ch] (gimp_gegl_init): set the GEGL cache 
size
	as large as the GIMP tile-cache.


svn path=/trunk/; revision=27669
parent 1ff4b3da
......@@ -187,7 +187,7 @@ app_run (const gchar *full_prog_name,
/* initialize lowlevel stuff */
swap_is_ok = base_init (config, be_verbose, use_cpu_accel);
gimp_gegl_init ();
gimp_gegl_init (gimp);
#ifndef GIMP_CONSOLE_COMPILATION
if (! no_interface)
......
......@@ -27,6 +27,10 @@
#include "base/tile.h"
#include "config/gimpbaseconfig.h"
#include "core/gimp.h"
#include "gimp-gegl.h"
#include "gimpoperationcolorbalance.h"
#include "gimpoperationcolorize.h"
......@@ -42,12 +46,26 @@
#include "gimpoperationpointlayermode.h"
static void gimp_gegl_notify_tile_cache_size (GimpBaseConfig *config);
void
gimp_gegl_init (void)
gimp_gegl_init (Gimp *gimp)
{
GimpBaseConfig *config;
g_return_if_fail (GIMP_IS_GIMP (gimp));
config = GIMP_BASE_CONFIG (gimp->config);
g_object_set (gegl_config (),
"tile-width", TILE_WIDTH,
"tile-height", TILE_HEIGHT,
"cache-size", config->tile_cache_size,
NULL);
g_signal_connect (config, "notify::tile-cache-size",
G_CALLBACK (gimp_gegl_notify_tile_cache_size),
NULL);
g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SINK);
......@@ -64,3 +82,11 @@ gimp_gegl_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_POINT_LAYER_MODE);
}
static void
gimp_gegl_notify_tile_cache_size (GimpBaseConfig *config)
{
g_object_set (gegl_config (),
"cache-size", config->tile_cache_size,
NULL);
}
......@@ -23,7 +23,7 @@
#define __GIMP_GEGL_H__
void gimp_gegl_init (void);
void gimp_gegl_init (Gimp *gimp);
#endif /* __GIMP_GEGL_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment