gimp r27669 - in trunk/app: . gegl
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27669 - in trunk/app: . gegl
- Date: Sun, 16 Nov 2008 10:30:49 +0000 (UTC)
Author: neo
Date: Sun Nov 16 10:30:49 2008
New Revision: 27669
URL: http://svn.gnome.org/viewvc/gimp?rev=27669&view=rev
Log:
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.
Modified:
trunk/app/app.c
trunk/app/gegl/gimp-gegl.c
trunk/app/gegl/gimp-gegl.h
Modified: trunk/app/app.c
==============================================================================
--- trunk/app/app.c (original)
+++ trunk/app/app.c Sun Nov 16 10:30:49 2008
@@ -187,7 +187,7 @@
/* 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)
Modified: trunk/app/gegl/gimp-gegl.c
==============================================================================
--- trunk/app/gegl/gimp-gegl.c (original)
+++ trunk/app/gegl/gimp-gegl.c Sun Nov 16 10:30:49 2008
@@ -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,14 +46,28 @@
#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);
g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SOURCE);
@@ -64,3 +82,11 @@
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);
+}
Modified: trunk/app/gegl/gimp-gegl.h
==============================================================================
--- trunk/app/gegl/gimp-gegl.h (original)
+++ trunk/app/gegl/gimp-gegl.h Sun Nov 16 10:30:49 2008
@@ -23,7 +23,7 @@
#define __GIMP_GEGL_H__
-void gimp_gegl_init (void);
+void gimp_gegl_init (Gimp *gimp);
#endif /* __GIMP_GEGL_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]