gegl r2212 - in trunk: . bin docs docs/gallery gegl gegl/buffer gegl/graph gegl/process operations
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2212 - in trunk: . bin docs docs/gallery gegl gegl/buffer gegl/graph gegl/process operations
- Date: Mon, 21 Apr 2008 14:04:11 +0100 (BST)
Author: ok
Date: Mon Apr 21 13:04:11 2008
New Revision: 2212
URL: http://svn.gnome.org/viewvc/gegl?rev=2212&view=rev
Log:
removed accidentally prepared-ChangeLog.pl entry
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/NEWS
trunk/bin/editor.c
trunk/docs/ChangeLog
trunk/docs/Makefile.am
trunk/docs/gallery/Makefile.am
trunk/docs/index-static.txt.in
trunk/gegl/buffer/gegl-buffer-index.h
trunk/gegl/buffer/gegl-buffer-load.c
trunk/gegl/buffer/gegl-buffer-share.c
trunk/gegl/gegl-debug.h
trunk/gegl/gegl-types.h
trunk/gegl/graph/gegl-node.c
trunk/gegl/graph/gegl-node.h
trunk/gegl/process/Makefile.am
trunk/gegl/process/gegl-eval-mgr.c
trunk/gegl/process/gegl-have-visitor.c
trunk/gegl/process/gegl-processor.c
trunk/operations/Makefile-common.am
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Mon Apr 21 13:04:11 2008
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = dist-bzip2
-SUBDIRS= gegl operations bin tools
+SUBDIRS= gegl operations bin tools examples
if ENABLE_DOCS
SUBDIRS+= docs
endif
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Apr 21 13:04:11 2008
@@ -5,6 +5,12 @@
GEGL only has released development snapshots thus far. Odd micro versions are
from SVN whilst even micro numbers indicate released snapshots.
+Changes in GEGL 0.0.17
+ââââââââââââââââââââââ
+ â Performance of GeglBuffer improved.
+ â Handle optimized versions of innerloops for operations.
+ â SSE detection and optimization for some point ops.
+
Changes in GEGL 0.0.16
ââââââââââââââââââââââ
â Install headers for development of external operation plug-ins.
Modified: trunk/bin/editor.c
==============================================================================
--- trunk/bin/editor.c (original)
+++ trunk/bin/editor.c Mon Apr 21 13:04:11 2008
@@ -259,6 +259,7 @@
static void cb_about (GtkAction *action);
/*static void cb_introspect (GtkAction *action);*/
static void cb_export (GtkAction *action);
+static void cb_flush (GtkAction *action);
static void cb_quit_dialog (GtkAction *action);
static void cb_composition_new (GtkAction *action);
static void cb_composition_load (GtkAction *action);
@@ -321,6 +322,11 @@
"Export to PNG",
G_CALLBACK (cb_export)},
+ {"Flush", GTK_STOCK_SAVE,
+ "_Flush", "<control><shift>E",
+ "Flush swap buffer",
+ G_CALLBACK (cb_flush)},
+
{"ShrinkWrap", NULL,
"_Shrink Wrap", "<control>E",
"Size the window to the image, if feasible",
@@ -388,6 +394,7 @@
" <menuitem action='Previous'/>"
" <separator/>"
" <menuitem action='Export'/>"
+ " <menuitem action='Flush'/>"
" <separator/>"
" <menuitem action='Quit'/>"
" <separator/>"
@@ -1154,6 +1161,17 @@
export_window ();
}
+#include "gegl-plugin.h"
+#include "graph/gegl-node.h" /*< FIXME: including internal header */
+
+static void cb_flush (GtkAction *action)
+{
+ GeglNode *node;
+ g_object_get (GEGL_VIEW(editor.view), "node", &node, NULL);
+ gegl_buffer_flush (GEGL_BUFFER (gegl_node_get_cache (node)));
+
+}
+
void editor_refresh_structure (void)
{
GeglStore *store = gegl_store_new ();
@@ -1165,10 +1183,11 @@
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
GTK_TREE_MODEL (store));
}
-
-typedef struct _GeglPad GeglPad;
void gegl_pad_set_format (gpointer,gpointer);
+#if 0
+typedef struct _GeglPad GeglPad;
gpointer gegl_node_get_pad (gpointer, const gchar *name);
+#endif
static void editor_set_gegl (GeglNode *gegl)
{
Modified: trunk/docs/Makefile.am
==============================================================================
--- trunk/docs/Makefile.am (original)
+++ trunk/docs/Makefile.am Mon Apr 21 13:04:11 2008
@@ -48,11 +48,11 @@
all-local: $(HTML_FILES)
operations.html: $(top_builddir)/tools/operation_reference $(top_srcdir)/operations/*/*.c
- GEGL_PATH=$(top_builddir)/operations \
+ GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations \
$(top_builddir)/tools/operation_reference --ops-html > $@
class-hierarchy.html: $(top_builddir)/tools/introspect $(top_srcdir)/operations/*/*.c $(top_srcdir)/gegl/*.c
- GEGL_PATH=$(top_builddir)/operations \
+ GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations \
$(top_builddir)/tools/introspect > $@
gegl.h.html: $(top_srcdir)/gegl/gegl.h
Modified: trunk/docs/gallery/Makefile.am
==============================================================================
--- trunk/docs/gallery/Makefile.am (original)
+++ trunk/docs/gallery/Makefile.am Mon Apr 21 13:04:11 2008
@@ -38,12 +38,8 @@
@touch images.stamp
%.png: %.xml
- @GEGL_DEBUG_TIME=yes GEGL_PATH=$(top_builddir)/operations \
+ @GEGL_DEBUG_TIME=yes GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations \
$(top_builddir)/bin/gegl $< -o `echo $@ | sed s?$(srcdir)/??` > `echo $@ | sed s?$(srcdir)/?? | sed -e s/png/txt/`;
-if HAVE_GRAPHVIZ
- @GEGL_PATH=$(top_builddir)/operations \
- $(top_builddir)/bin/gegl --dot $< | $(GRAPHVIZ) -Tpng -o `echo $@ | sed s?$(srcdir)/?? | sed s/.png/-graph.png/` >/dev/null
-endif
all-local: images.stamp index.html
Modified: trunk/docs/index-static.txt.in
==============================================================================
--- trunk/docs/index-static.txt.in (original)
+++ trunk/docs/index-static.txt.in Mon Apr 21 13:04:11 2008
@@ -7,6 +7,13 @@
----
GEGL (Generic Graphics Library) is a graph based image processing framework.
+GEGL is a raster compositing and processing core. It provides a framework for
+organizing operations into nodes in a graph that can contain cached states to
+improve re-render performance. It currently implements a set of 32bit floating
+point buffer operations for filters, video frame loading, file loading, pattern
+generation, webcam input. As well as operations for storing individual frames,
+generate video sequences or displaying the result in fullscreen.
+
GEGL's original design was made to scratch http://www.gimp.org/[GIMP]'s itches
for a new compositing and processing core. This core is being designed to have
minimal dependencies. and a simple well defined API.
Modified: trunk/gegl/buffer/gegl-buffer-index.h
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-index.h (original)
+++ trunk/gegl/buffer/gegl-buffer-index.h Mon Apr 21 13:04:11 2008
@@ -93,7 +93,7 @@
typedef union {
guint32 length;
GeglBufferBlock block;
- GeglBufferHeader def;
+ GeglBufferHeader header;
GeglBufferTile tile;
} GeglBufferItem;
Modified: trunk/gegl/buffer/gegl-buffer-load.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-load.c (original)
+++ trunk/gegl/buffer/gegl-buffer-load.c Mon Apr 21 13:04:11 2008
@@ -41,6 +41,7 @@
#include "gegl-cache.h"
#include "gegl-region.h"
#include "gegl-buffer-index.h"
+#include "gegl-debug.h"
#include <glib/gprintf.h>
@@ -61,13 +62,15 @@
static void seekto(LoadInfo *info, gint pos)
{
info->pos = pos;
- g_printf ("seek to %i\n", pos);
- g_seekable_seek (G_SEEKABLE (info->i), info->pos, G_SEEK_SET, NULL, NULL);
+ GEGL_NOTE (BUFFER_LOAD, "seek to %i", pos);
+ if(!g_seekable_seek (G_SEEKABLE (info->i), info->pos, G_SEEK_SET, NULL, NULL))
+ {
+ g_warning ("failed seeking");
+ }
}
static GeglBufferItem *read_header (LoadInfo *info)
{
- GeglBufferBlock block;
GeglBufferItem *ret;
/* XXX: initialize synchronize buffer state */
@@ -77,30 +80,18 @@
seekto (info, 0);
}
- info->pos += g_input_stream_read (info->i, &block, sizeof (GeglBufferBlock), NULL, NULL);
+ ret = g_malloc (sizeof (GeglBufferHeader));
+ info->pos+= g_input_stream_read (info->i,
+ ((gchar*)ret),
+ sizeof(GeglBufferHeader),
+ NULL, NULL);
- if (info->got_header)
- {
- ret = g_malloc (block.length);
- memcpy (ret, &block, sizeof (GeglBufferBlock));
- info->pos+= g_input_stream_read (info->i,
- ((gchar*)ret) + sizeof(GeglBufferBlock),
- block.length - sizeof(GeglBufferBlock),
- NULL, NULL);
- }
- else
- {
- info->got_header = TRUE;
- ret = g_malloc (sizeof (GeglBufferHeader));
- memcpy (ret, &block, sizeof (GeglBufferBlock));
- info->pos+= g_input_stream_read (info->i,
- ((gchar*)ret) + sizeof(GeglBufferBlock),
- sizeof(GeglBufferHeader) - sizeof(GeglBufferBlock),
- NULL, NULL);
- }
info->next_block = ret->block.next;
- g_printf ("header: next:%i\n", (guint)ret->block.next);
+ GEGL_NOTE (BUFFER_LOAD, "read header: tile-width: %i tile-height: %i next:%i\n",
+ ret->header.tile_width,
+ ret->header.tile_height,
+ (guint)ret->block.next);
return ret;
}
@@ -119,24 +110,16 @@
info->pos+= g_input_stream_read (info->i, &block, sizeof (GeglBufferBlock),
NULL, NULL);
- if (info->got_header)
- {
- ret = g_malloc (block.length);
- memcpy (ret, &block, sizeof (GeglBufferBlock));
- info->pos+= g_input_stream_read (info->i,
- ((gchar*)ret) + sizeof(GeglBufferBlock),
- block.length - sizeof(GeglBufferBlock),
- NULL, NULL);
- }
- else
- {
- info->got_header = TRUE;
- ret = g_malloc (sizeof (GeglBufferHeader));
- memcpy (ret, &block, sizeof (GeglBufferBlock));
- info->pos+= g_input_stream_read (info->i, ((gchar*)ret) + sizeof(GeglBufferBlock),
- sizeof(GeglBufferHeader) - sizeof(GeglBufferBlock),
- NULL, NULL);
- }
+ GEGL_NOTE (BUFFER_LOAD, "read block: length:%i next:%i",
+ block.length,
+ (guint)block.next);
+
+ ret = g_malloc (block.length);
+ memcpy (ret, &block, sizeof (GeglBufferBlock));
+ info->pos+= g_input_stream_read (info->i,
+ ((gchar*)ret) + sizeof(GeglBufferBlock),
+ block.length - sizeof(GeglBufferBlock),
+ NULL, NULL);
info->next_block = ret->block.next;
return ret;
}
@@ -166,18 +149,21 @@
g_slice_free (LoadInfo, info);
}
+static void sanity(void) { GEGL_BUFFER_SANITY; }
-void
-gegl_buffer_load (GeglBuffer *buffer,
- const gchar *path)
+GeglBuffer *
+gegl_buffer_open (const gchar *path)
{
+ GeglBuffer *ret;
LoadInfo *info = g_slice_new0 (LoadInfo);
- GEGL_BUFFER_SANITY;
+ sanity();
info->path = g_strdup (path);
info->file = g_file_new_for_commandline_arg (info->path);
info->i = G_INPUT_STREAM (g_file_read (info->file, NULL, NULL));
+
+ GEGL_NOTE (BUFFER_LOAD, "starting to load buffer %s", path);
#if 0
if (info->fd == -1)
{
@@ -213,13 +199,15 @@
info->header.bytes_per_pixel;
info->format = babl_format (info->header.description);
+ ret = g_object_new (GEGL_TYPE_BUFFER, "format", info->format, NULL);
+
/* load the index */
{
GeglBufferItem *item; /* = read_block (info);*/
for (item = read_block (info); item; item = read_block (info))
{
g_assert (item);
- g_print ("%i, %i, %i offset:%i next:%i\n", item->tile.x,
+ GEGL_NOTE (BUFFER_LOAD,"loaded item: %i, %i, %i offset:%i next:%i", item->tile.x,
item->tile.y,
item->tile.z,
(guint)item->tile.offset,
@@ -240,15 +228,10 @@
GeglTile *tile;
- tile = gegl_tile_source_get_tile (GEGL_TILE_SOURCE (buffer),
+ tile = gegl_tile_source_get_tile (GEGL_TILE_SOURCE (ret),
entry->x,
entry->y,
entry->z);
- g_assert (tile);
- gegl_tile_lock (tile);
-
- data = gegl_tile_get_data (tile);
- g_assert (data);
if (info->pos != entry->offset)
{
@@ -256,6 +239,13 @@
}
g_assert (info->pos == entry->offset);
+
+ g_assert (tile);
+ gegl_tile_lock (tile);
+
+ data = gegl_tile_get_data (tile);
+ g_assert (data);
+
info->pos += g_input_stream_read (info->i, data, info->tile_size,
NULL, NULL);
@@ -264,20 +254,10 @@
gegl_tile_unlock (tile);
g_object_unref (G_OBJECT (tile));
i++;
-
- if (GEGL_IS_CACHE (buffer) && entry->z == 0)
- {
- GeglRectangle rect;
-
- gegl_rectangle_set (&rect, entry->x * info->header.tile_width,
- entry->y * info->header.tile_height,
- info->header.tile_width,
- info->header.tile_height);
- gegl_region_union_with_rect (GEGL_CACHE (buffer)->valid_region, &rect);
- }
}
- /*fprintf (stderr, "done \n");*/
+ GEGL_NOTE (BUFFER_LOAD, "buffer loaded %s tiles loaded: %i", info->path, i);
}
load_info_destroy (info);
+ return ret;
}
Modified: trunk/gegl/buffer/gegl-buffer-share.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-share.c (original)
+++ trunk/gegl/buffer/gegl-buffer-share.c Mon Apr 21 13:04:11 2008
@@ -80,7 +80,7 @@
}
}
-
+#if 0
GeglBuffer*
gegl_buffer_open (const gchar *uri)
{
@@ -109,3 +109,4 @@
g_warning ("don't know how to handle buffer path: %s", uri);
return NULL;
}
+#endif
Modified: trunk/gegl/gegl-debug.h
==============================================================================
--- trunk/gegl/gegl-debug.h (original)
+++ trunk/gegl/gegl-debug.h Mon Apr 21 13:04:11 2008
@@ -74,20 +74,11 @@
#define GEGL_MARK() GEGL_NOTE(MISC, "== mark ==")
#define GEGL_DBG(x) { a }
-#define GEGL_GLERR() G_STMT_START { \
- if (gegl_debug_flags & GEGL_DEBUG_GL) \
- { GLenum _err = glGetError (); /* roundtrip */ \
- if (_err != GL_NO_ERROR) \
- g_warning (G_STRLOC ": GL Error %x", _err); \
- } } G_STMT_END
-
-
#else /* !GEGL_ENABLE_DEBUG */
#define GEGL_NOTE(type,...)
#define GEGL_MARK()
#define GEGL_DBG(x)
-#define GEGL_GLERR()
#define GEGL_TIMESTAMP(type,...)
#endif /* GEGL_ENABLE_DEBUG */
Modified: trunk/gegl/gegl-types.h
==============================================================================
--- trunk/gegl/gegl-types.h (original)
+++ trunk/gegl/gegl-types.h Mon Apr 21 13:04:11 2008
@@ -60,6 +60,8 @@
typedef struct _GeglConnection GeglConnection;
#endif
typedef struct _GeglPrepareVisitor GeglPrepareVisitor;
+typedef struct _GeglLockVisitor GeglLockVisitor;
+typedef struct _GeglUnlockVisitor GeglUnlockVisitor;
typedef struct _GeglVisitable GeglVisitable; /* dummy typedef */
typedef struct _GeglVisitor GeglVisitor;
Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c (original)
+++ trunk/gegl/graph/gegl-node.c Mon Apr 21 13:04:11 2008
@@ -40,6 +40,8 @@
#include "process/gegl-eval-mgr.h"
#include "process/gegl-have-visitor.h"
+#include "process/gegl-lock-visitor.h"
+#include "process/gegl-unlock-visitor.h"
#include "process/gegl-prepare-visitor.h"
#include "process/gegl-finish-visitor.h"
#include "process/gegl-processor.h"
@@ -183,6 +185,10 @@
GEGL_TYPE_NODE,
GeglNodePrivate);
+#if ENABLE_MP
+ self->mutex = g_mutex_new ();
+#endif
+
priv = GEGL_NODE_GET_PRIVATE (self);
self->pads = NULL;
@@ -270,6 +276,14 @@
g_free (priv->name);
}
+#if ENABLE_MP
+ if (self->mutex)
+ {
+ g_mutex_free (self->mutex);
+ self->mutex = NULL;
+ }
+#endif
+
G_OBJECT_CLASS (gegl_node_parent_class)->finalize (gobject);
}
@@ -506,6 +520,7 @@
g_return_if_fail (GEGL_IS_NODE (node));
g_return_if_fail (rect != NULL);
+ gegl_node_lock (node);
if (node->cache)
{
gegl_cache_invalidate (node->cache, rect);
@@ -513,6 +528,7 @@
g_signal_emit (node, gegl_node_signals[INVALIDATED], 0,
rect, NULL);
+ gegl_node_unlock (node);
}
static void
@@ -1466,6 +1482,9 @@
GeglVisitor *prepare_visitor;
GeglVisitor *have_visitor;
GeglVisitor *finish_visitor;
+ GeglVisitor *lock_visitor;
+ GeglVisitor *unlock_visitor;
+
guchar *id;
gint i;
@@ -1483,6 +1502,12 @@
g_object_ref (root);
id = g_malloc (1);
+if (0)
+ {
+ lock_visitor = g_object_new (GEGL_TYPE_LOCK_VISITOR, "id", id, NULL);
+ gegl_visitor_dfs_traverse (lock_visitor, GEGL_VISITABLE (root));
+ g_object_unref (lock_visitor);
+ }
for (i = 0; i < 2; i++)
{
@@ -1499,6 +1524,12 @@
gegl_visitor_dfs_traverse (finish_visitor, GEGL_VISITABLE (root));
g_object_unref (finish_visitor);
+ if(0) {
+ unlock_visitor = g_object_new (GEGL_TYPE_UNLOCK_VISITOR, "id", id, NULL);
+ gegl_visitor_dfs_traverse (unlock_visitor, GEGL_VISITABLE (root));
+ g_object_unref (unlock_visitor);
+ }
+
g_object_unref (root);
g_free (id);
@@ -2100,3 +2131,23 @@
{
return g_object_new (GEGL_TYPE_NODE, NULL);
}
+
+void
+gegl_node_lock (GeglNode *node)
+{
+#if ENABLE_MP
+ g_return_if_fail (GEGL_IS_NODE (node));
+ g_print ("locking %s %p\n", gegl_node_get_debug_name (node), node->mutex);
+ g_mutex_lock (node->mutex);
+#endif
+}
+
+void
+gegl_node_unlock (GeglNode *node)
+{
+#if ENABLE_MP
+ g_return_if_fail (GEGL_IS_NODE (node));
+ g_print ("unlocking %s %p\n", gegl_node_get_debug_name (node), node->mutex);
+ g_mutex_unlock (node->mutex);
+#endif
+}
Modified: trunk/gegl/graph/gegl-node.h
==============================================================================
--- trunk/gegl/graph/gegl-node.h (original)
+++ trunk/gegl/graph/gegl-node.h Mon Apr 21 13:04:11 2008
@@ -63,6 +63,8 @@
reused for all subsequent requests for the cache
object.*/
+ GMutex *mutex;
+
/*< private >*/
GeglNodePrivate *priv;
};
@@ -119,6 +121,12 @@
const gchar *first_property_name,
...) G_GNUC_NULL_TERMINATED;
+
+
+GeglNode * gegl_node_get_parent (GeglNode *self);
+GeglNode * gegl_node_adopt_child (GeglNode *self,
+ GeglNode *child);
+
/* functions below are internal to gegl */
GType gegl_node_get_type (void) G_GNUC_CONST;
@@ -216,6 +224,9 @@
void gegl_node_set_name (GeglNode *self,
const gchar *name);
+void gegl_node_lock (GeglNode *node);
+void gegl_node_unlock (GeglNode *node);
+
G_END_DECLS
#endif /* __GEGL_NODE_H__ */
Modified: trunk/gegl/process/Makefile.am
==============================================================================
--- trunk/gegl/process/Makefile.am (original)
+++ trunk/gegl/process/Makefile.am Mon Apr 21 13:04:11 2008
@@ -7,9 +7,11 @@
gegl-eval-visitor.c \
gegl-finish-visitor.c \
gegl-have-visitor.c \
+ gegl-lock-visitor.c \
gegl-need-visitor.c \
gegl-prepare-visitor.c \
- gegl-processor.c
+ gegl-processor.c \
+ gegl-unlock-visitor.c
@@ -20,9 +22,11 @@
gegl-eval-visitor.h \
gegl-finish-visitor.h \
gegl-have-visitor.h \
+ gegl-lock-visitor.h \
gegl-need-visitor.h \
gegl-prepare-visitor.h \
- gegl-processor.h
+ gegl-processor.h \
+ gegl-unlock-visitor.h
libprocess_la_SOURCES = $(PROCESS_sources) $(PROCESS_headers)
Modified: trunk/gegl/process/gegl-eval-mgr.c
==============================================================================
--- trunk/gegl/process/gegl-eval-mgr.c (original)
+++ trunk/gegl/process/gegl-eval-mgr.c Mon Apr 21 13:04:11 2008
@@ -29,6 +29,8 @@
#include "gegl-cr-visitor.h"
#include "gegl-have-visitor.h"
#include "gegl-need-visitor.h"
+#include "gegl-lock-visitor.h"
+#include "gegl-unlock-visitor.h"
#include "gegl-instrument.h"
#include "graph/gegl-node.h"
#include "gegl-prepare-visitor.h"
@@ -99,6 +101,14 @@
root = pad->node;
g_object_ref (root);
+#if ENABLE_MP
+ if(0){
+ GeglVisitor *lock_visitor = g_object_new (GEGL_TYPE_LOCK_VISITOR, "id", context_id, NULL);
+ gegl_visitor_dfs_traverse (lock_visitor, GEGL_VISITABLE (root));
+ g_object_unref (lock_visitor);
+ }
+#endif
+
for (i = 0; i < 2; i++)
{
prepare_visitor = g_object_new (GEGL_TYPE_PREPARE_VISITOR, "id", context_id, NULL);
@@ -110,6 +120,15 @@
gegl_visitor_dfs_traverse (have_visitor, GEGL_VISITABLE (root));
g_object_unref (have_visitor);
+#if ENABLE_MP
+ if(0){
+ GeglVisitor *unlock_visitor = g_object_new (GEGL_TYPE_UNLOCK_VISITOR, "id", context_id, NULL);
+ gegl_visitor_dfs_traverse (unlock_visitor, GEGL_VISITABLE (root));
+ g_object_unref (unlock_visitor);
+ }
+#endif
+
+
g_assert (root);
if (self->roi.width == -1 &&
Modified: trunk/gegl/process/gegl-have-visitor.c
==============================================================================
--- trunk/gegl/process/gegl-have-visitor.c (original)
+++ trunk/gegl/process/gegl-have-visitor.c Mon Apr 21 13:04:11 2008
@@ -63,8 +63,6 @@
if (!node)
return;
operation = node->operation;
- if (!operation)
- return;
rect = gegl_operation_get_bounding_box (operation);
node->have_rect = rect;
Modified: trunk/gegl/process/gegl-processor.c
==============================================================================
--- trunk/gegl/process/gegl-processor.c (original)
+++ trunk/gegl/process/gegl-processor.c Mon Apr 21 13:04:11 2008
@@ -297,12 +297,13 @@
/* returns TRUE if there is more work */
static gboolean render_rectangle (GeglProcessor *processor)
{
- gboolean buffered = !(GEGL_IS_OPERATION_SINK(processor->node->operation) &&
- !gegl_operation_sink_needs_full (processor->node->operation));
+ gboolean buffered;
const gint max_area = processor->chunk_size;
- GeglCache *cache = NULL;
- gint pxsize = 0;
+ GeglCache *cache = NULL;
+ gint pxsize;
+ buffered = !(GEGL_IS_OPERATION_SINK(processor->node->operation) &&
+ !gegl_operation_sink_needs_full (processor->node->operation));
if (buffered)
{
cache = gegl_node_get_cache (processor->input);
@@ -365,8 +366,8 @@
if (buffered)
{
- /* only do work if the rectangle is not completely inside the valid region of
- * the cache
+ /* only do work if the rectangle is not completely inside the valid
+ * region of the cache
*/
if (gegl_region_rect_in (cache->valid_region, dr) !=
GEGL_OVERLAP_RECTANGLE_IN)
@@ -377,10 +378,13 @@
buf = g_malloc (dr->width * dr->height * pxsize);
g_assert (buf);
- gegl_node_blit (cache->node, 1.0, dr, cache->format, buf, GEGL_AUTO_ROWSTRIDE,
- GEGL_BLIT_DEFAULT);
+ gegl_node_blit (cache->node, 1.0, dr, cache->format, buf,
+ GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_DEFAULT);
+
+
/* check that we haven't been recently */
- gegl_buffer_set (GEGL_BUFFER (cache), dr, cache->format, buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (GEGL_BUFFER (cache), dr, cache->format, buf,
+ GEGL_AUTO_ROWSTRIDE);
gegl_cache_computed (cache, dr);
@@ -389,7 +393,8 @@
}
else
{
- gegl_node_blit (processor->node, 1.0, dr, NULL, NULL, GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_DEFAULT);
+ gegl_node_blit (processor->node, 1.0, dr, NULL, NULL,
+ GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_DEFAULT);
gegl_region_union_with_rect (processor->valid_region, dr);
g_slice_free (GeglRectangle, dr);
}
Modified: trunk/operations/Makefile-common.am
==============================================================================
--- trunk/operations/Makefile-common.am (original)
+++ trunk/operations/Makefile-common.am Mon Apr 21 13:04:11 2008
@@ -21,5 +21,5 @@
-I$(top_srcdir)/gegl/property-types \
-I$(top_srcdir)/gegl/module
-AM_LDFLAGS = -avoid-version -export-dynamic -module $(no_undefined) -Wl,--as-needed
+AM_LDFLAGS = -avoid-version -export-dynamic -module $(no_undefined)
ext_dir = $(DESTDIR)$(libdir)/gegl- GEGL_API_VERSION@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]