gegl r2311 - in trunk: . gegl gegl/graph
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2311 - in trunk: . gegl gegl/graph
- Date: Sat, 17 May 2008 21:53:28 +0000 (UTC)
Author: ok
Date: Sat May 17 21:53:27 2008
New Revision: 2311
URL: http://svn.gnome.org/viewvc/gegl?rev=2311&view=rev
Log:
Removed no-node-caches configuration option, since this is now handled
by the no-cache property on GeglNode instead.
* gegl/gegl-config.c: (get_property), (set_property),
(gegl_config_class_init), (gegl_config_init):
* gegl/gegl-config.h:
* gegl/gegl-init.c: (gegl_post_parse_hook):
* gegl/graph/gegl-node-context.c:
(gegl_node_context_remove_property), (gegl_node_context_add_value),
(gegl_node_context_get_target):
Modified:
trunk/ChangeLog
trunk/gegl/gegl-config.c
trunk/gegl/gegl-config.h
trunk/gegl/gegl-init.c
trunk/gegl/graph/gegl-node-context.c
Modified: trunk/gegl/gegl-config.c
==============================================================================
--- trunk/gegl/gegl-config.c (original)
+++ trunk/gegl/gegl-config.c Sat May 17 21:53:27 2008
@@ -31,8 +31,7 @@
PROP_QUALITY,
PROP_CACHE_SIZE,
PROP_SWAP,
- PROP_BABL_ERROR,
- PROP_NODE_CACHES
+ PROP_BABL_ERROR
};
static void
@@ -61,10 +60,6 @@
g_value_set_string (value, config->swap);
break;
- case PROP_NODE_CACHES:
- g_value_set_boolean (value, config->node_caches);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
break;
@@ -104,9 +99,6 @@
g_free (config->swap);
config->swap = g_value_dup_string (value);
break;
- case PROP_NODE_CACHES:
- config->node_caches = g_value_get_boolean (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
break;
@@ -135,10 +127,6 @@
gobject_class->get_property = get_property;
gobject_class->finalize = finalize;
- g_object_class_install_property (gobject_class, PROP_NODE_CACHES,
- g_param_spec_boolean ("node-caches", "Node caches", "Whether GEGL caches the results at each node in the graph.", TRUE,
- G_PARAM_READWRITE));
-
g_object_class_install_property (gobject_class, PROP_CACHE_SIZE,
g_param_spec_double ("cachei-size", "Cache size", "size of cache in bytes",
0.0, 1.0, 1.0,
@@ -165,5 +153,4 @@
self->swap = NULL;
self->quality = 1.0;
self->cache_size = 256*1024*1024;
- self->node_caches = TRUE;
}
Modified: trunk/gegl/gegl-config.h
==============================================================================
--- trunk/gegl/gegl-config.h (original)
+++ trunk/gegl/gegl-config.h Sat May 17 21:53:27 2008
@@ -42,7 +42,6 @@
gint cache_size;
gdouble quality;
gdouble babl_error;
- gboolean node_caches;
};
struct _GeglConfigClass
Modified: trunk/gegl/gegl-init.c
==============================================================================
--- trunk/gegl/gegl-init.c (original)
+++ trunk/gegl/gegl-init.c Sat May 17 21:53:27 2008
@@ -159,7 +159,6 @@
static gchar *cmd_gegl_cache_size=NULL;
static gchar *cmd_gegl_quality=NULL;
static gchar *cmd_babl_error=NULL;
-static gboolean cmd_no_node_caches=FALSE;
static const GOptionEntry cmd_entries[]=
{
@@ -179,11 +178,6 @@
N_("How much memory to (approximately) use for caching imagery"), "<megabytes>"
},
{
- "gegl-no-node-caches", 0, 0,
- G_OPTION_ARG_NONE, &cmd_no_node_caches,
- N_("Don't use per node caches to speed up _re_evaluation of the graph"),
- },
- {
"gegl-quality", 0, 0,
G_OPTION_ARG_STRING, &cmd_gegl_quality,
N_("The quality of rendering a value between 0.0(fast) and 1.0(reference)"), "<quality>"
@@ -351,9 +345,6 @@
if (g_getenv ("GEGL_CACHE_SIZE"))
config->cache_size = atoi(g_getenv("GEGL_CACHE_SIZE"))* 1024*1024;
- config->node_caches = !cmd_no_node_caches;
- if (g_getenv ("GEGL_NO_NODE_CACHES"))
- g_object_set (config, "node-caches", FALSE, NULL);
if (gegl_swap_dir())
config->swap = g_strdup(gegl_swap_dir ());
if (cmd_gegl_swap)
Modified: trunk/gegl/graph/gegl-node-context.c
==============================================================================
--- trunk/gegl/graph/gegl-node-context.c (original)
+++ trunk/gegl/graph/gegl-node-context.c Sat May 17 21:53:27 2008
@@ -204,15 +204,15 @@
{
Property *property = NULL;
- {
- GSList *found;
- found = g_slist_find_custom (self->property, property_name, lookup_property);
- if (found)
- property = found->data;
- }
+ GSList *found;
+ found = g_slist_find_custom (self->property, property_name, lookup_property);
+ if (found)
+ property = found->data;
+
if (!property)
{
- g_warning ("didn't find context %p for %s", property_name, gegl_node_get_debug_name (self->node));
+ g_warning ("didn't find context %p for %s", property_name,
+ gegl_node_get_debug_name (self->node));
return;
}
self->property = g_slist_remove (self->property, property);
@@ -224,7 +224,9 @@
const gchar *property_name)
{
Property *property = NULL;
- GSList *found = g_slist_find_custom (self->property, property_name, lookup_property);
+ GSList *found;
+
+ found = g_slist_find_custom (self->property, property_name, lookup_property);
if (found)
property = found->data;
@@ -333,7 +335,8 @@
if (format == NULL)
{
- g_warning ("no format for %s presuming RGBA float\n", gegl_node_get_debug_name (node));
+ g_warning ("no format for %s presuming RGBA float\n",
+ gegl_node_get_debug_name (node));
format = babl_format ("RGBA float");
}
g_assert (format != NULL);
@@ -341,8 +344,7 @@
result = &context->result_rect;
- if (gegl_config()->node_caches &&
- node->dont_cache == FALSE &&
+ if (node->dont_cache == FALSE &&
! GEGL_OPERATION_CLASS (G_OBJECT_GET_CLASS (operation))->no_cache)
{
GeglBuffer *cache;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]