[gegl] gegl: Add GEGL_DEBUG_INVALIDATION to GeglDebugFlag
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gegl] gegl: Add GEGL_DEBUG_INVALIDATION to GeglDebugFlag
- Date: Mon, 22 Jun 2009 01:44:51 -0400 (EDT)
commit 269a7b2013ccbe602ab49a1da1418f8fa62159ab
Author: Martin Nordholts <martinn src gnome org>
Date: Mon Jun 22 07:13:20 2009 +0200
gegl: Add GEGL_DEBUG_INVALIDATION to GeglDebugFlag
Add GEGL_DEBUG_INVALIDATION to GeglDebugFlag and convert the
"if (0)"-ed away output to GEGL_NODE (GEGL_DEBUG_INVALIDATION, ...).
gegl/gegl-debug.h | 4 +++-
gegl/graph/gegl-node.c | 22 +++++++++++-----------
2 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/gegl/gegl-debug.h b/gegl/gegl-debug.h
index 2bbd1bc..3e76318 100644
--- a/gegl/gegl-debug.h
+++ b/gegl/gegl-debug.h
@@ -13,7 +13,8 @@ typedef enum {
GEGL_DEBUG_TILE_BACKEND = 1 << 3,
GEGL_DEBUG_PROCESSOR = 1 << 4,
GEGL_DEBUG_CACHE = 1 << 5,
- GEGL_DEBUG_MISC = 1 << 6
+ GEGL_DEBUG_MISC = 1 << 6,
+ GEGL_DEBUG_INVALIDATION = 1 << 7
} GeglDebugFlag;
/* only compiled in from gegl-init.c but kept here to
@@ -28,6 +29,7 @@ static const GDebugKey gegl_debug_keys[] = {
{ "buffer-save", GEGL_DEBUG_BUFFER_SAVE},
{ "tile-backend", GEGL_DEBUG_TILE_BACKEND},
{ "processor", GEGL_DEBUG_PROCESSOR},
+ { "invalidation", GEGL_DEBUG_INVALIDATION},
{ "all", GEGL_DEBUG_PROCESS|
GEGL_DEBUG_BUFFER_LOAD|
GEGL_DEBUG_BUFFER_SAVE|
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 5485376..b90e07e 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -27,6 +27,7 @@
#include "gegl-types-internal.h"
#include "gegl.h"
+#include "gegl-debug.h"
#include "gegl-node.h"
#include "gegl-connection.h"
#include "gegl-pad.h"
@@ -542,12 +543,11 @@ gegl_node_source_invalidated (GeglNode *source,
GeglNode *destination = gegl_pad_get_node (destination_pad);
GeglRectangle dirty_rect;
- if (0) g_warning ("%s.%s is dirtied from %s (%i,%i %ix%i)",
- gegl_node_get_debug_name (destination),
- gegl_pad_get_name (destination_pad),
- gegl_node_get_debug_name (source),
- rect->x, rect->y,
- rect->width, rect->height);
+ GEGL_NOTE (GEGL_DEBUG_INVALIDATION, "%s.%s is dirtied from %s (%i,%i %iÃ?%i)",
+ gegl_node_get_debug_name (destination), gegl_pad_get_name (destination_pad),
+ gegl_node_get_debug_name (source),
+ rect->x, rect->y,
+ rect->width, rect->height);
if (destination->operation)
{
@@ -2013,11 +2013,11 @@ graph_source_invalidated (GeglNode *source,
GeglNode *destination = GEGL_NODE (data);
GeglRectangle dirty_rect = *rect;
- if (0) g_warning ("graph:%s is dirtied from %s (%i,%i %ix%i)",
- gegl_node_get_debug_name (destination),
- gegl_node_get_debug_name (source),
- rect->x, rect->y,
- rect->width, rect->height);
+ GEGL_NOTE (GEGL_DEBUG_INVALIDATION, "graph:%s is dirtied from %s (%i,%i %ix%i)",
+ gegl_node_get_debug_name (destination),
+ gegl_node_get_debug_name (source),
+ rect->x, rect->y,
+ rect->width, rect->height);
g_signal_emit (destination, gegl_node_signals[INVALIDATED], 0,
&dirty_rect, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]