Commit 8f275d29 authored by Øyvind Kolås's avatar Øyvind Kolås

s/Provider/Source/g s/provider/source/g s/PROVIDER/SOURCE/g

* gegl/buffer/Makefile.am:
* gegl/buffer/gegl-buffer-allocator.c:
* gegl/buffer/gegl-buffer-load.c: 
* gegl/buffer/gegl-buffer-private.h:
* gegl/buffer/gegl-buffer-save.c:
* gegl/buffer/gegl-buffer-types.h:
* gegl/buffer/gegl-buffer.c: 
* gegl/buffer/gegl-handler-cache.c:
* gegl/buffer/gegl-handler-empty.c:
* gegl/buffer/gegl-handler-log.c:
* gegl/buffer/gegl-handler-zoom.c:
* gegl/buffer/gegl-handler.c: 
* gegl/buffer/gegl-handler.h:
* gegl/buffer/gegl-handlers.c:
* gegl/buffer/gegl-handlers.h:
* gegl/buffer/gegl-provider.c:
* gegl/buffer/gegl-provider.h:
* gegl/buffer/gegl-source.c: 
* gegl/buffer/gegl-source.h:
* gegl/buffer/gegl-storage.c: 
* gegl/buffer/gegl-tile-backend.c:
* gegl/buffer/gegl-tile-backend.h:
* gegl/buffer/gegl-tile-disk.c:
* gegl/buffer/gegl-tile-gio.c:
* gegl/buffer/gegl-tile-mem.c:
* gegl/buffer/gegl-tile.c: 

svn path=/trunk/; revision=2169
parent a16840ca
2008-04-14 Øyvind Kolås <pippin@gimp.org>
s/Provider/Source/g s/provider/source/g s/PROVIDER/SOURCE/g
* gegl/buffer/Makefile.am:
* gegl/buffer/gegl-buffer-allocator.c:
* gegl/buffer/gegl-buffer-load.c:
* gegl/buffer/gegl-buffer-private.h:
* gegl/buffer/gegl-buffer-save.c:
* gegl/buffer/gegl-buffer-types.h:
* gegl/buffer/gegl-buffer.c:
* gegl/buffer/gegl-handler-cache.c:
* gegl/buffer/gegl-handler-empty.c:
* gegl/buffer/gegl-handler-log.c:
* gegl/buffer/gegl-handler-zoom.c:
* gegl/buffer/gegl-handler.c:
* gegl/buffer/gegl-handler.h:
* gegl/buffer/gegl-handlers.c:
* gegl/buffer/gegl-handlers.h:
* gegl/buffer/gegl-provider.c:
* gegl/buffer/gegl-provider.h:
* gegl/buffer/gegl-source.c:
* gegl/buffer/gegl-source.h:
* gegl/buffer/gegl-storage.c:
* gegl/buffer/gegl-tile-backend.c:
* gegl/buffer/gegl-tile-backend.h:
* gegl/buffer/gegl-tile-disk.c:
* gegl/buffer/gegl-tile-gio.c:
* gegl/buffer/gegl-tile-mem.c:
* gegl/buffer/gegl-tile.c:
2008-04-14 Øyvind Kolås <pippin@gimp.org>
reviewed by: <delete if not using a buddy>
* Makefile.am:
* autogen.sh:
* configure.ac:
* gegl/buffer/Makefile.am:
* gegl/buffer/gegl-buffer-allocator.c: (gegl_buffer_alloc),
(gegl_buffer_new_from_format):
* gegl/buffer/gegl-buffer-load.c: (gegl_buffer_load):
* gegl/buffer/gegl-buffer-private.h:
* gegl/buffer/gegl-buffer-save.c: (gegl_buffer_save):
* gegl/buffer/gegl-buffer-types.h:
* gegl/buffer/gegl-buffer.c: (gegl_buffer_dispose),
(gegl_buffer_backend), (gegl_buffer_storage),
(gegl_buffer_constructor), (get_tile), (command),
(gegl_buffer_class_init), (gegl_buffer_void), (pset), (pget),
(gegl_buffer_iterate), (gegl_buffer_set),
(gegl_buffer_create_sub_buffer):
* gegl/buffer/gegl-handler-cache.c: (get_tile), (command),
(gegl_handler_cache_class_init):
* gegl/buffer/gegl-handler-empty.c: (get_tile), (command),
(gegl_handler_empty_class_init):
* gegl/buffer/gegl-handler-log.c: (command),
(gegl_handler_log_class_init):
* gegl/buffer/gegl-handler-zoom.c: (get_tile), (command),
(gegl_handler_zoom_class_init):
* gegl/buffer/gegl-handler.c: (dispose), (command), (get_property),
(set_property), (gegl_handler_chain_up), (gegl_handler_class_init),
(gegl_handler_init):
* gegl/buffer/gegl-handler.h:
* gegl/buffer/gegl-handlers.c: (command),
(gegl_handlers_class_init), (gegl_handlers_rebind):
* gegl/buffer/gegl-handlers.h:
* gegl/buffer/gegl-provider.c:
* gegl/buffer/gegl-provider.h:
* gegl/buffer/gegl-source.c: (command), (gegl_source_class_init),
(gegl_source_init), (gegl_source_command):
* gegl/buffer/gegl-source.h:
* gegl/buffer/gegl-storage.c: (storage_idle),
(gegl_storage_constructor):
* gegl/buffer/gegl-tile-backend.c:
* gegl/buffer/gegl-tile-backend.h:
* gegl/buffer/gegl-tile-disk.c: (get_tile), (set_tile),
(void_tile), (exist_tile), (command), (gegl_tile_disk_class_init):
* gegl/buffer/gegl-tile-gio.c: (get_tile), (set_tile), (void_tile),
(exist_tile), (command), (gegl_tile_gio_class_init):
* gegl/buffer/gegl-tile-mem.c: (get_tile), (set_tile), (void_tile),
(exist_tile), (command), (gegl_tile_mem_class_init):
* gegl/buffer/gegl-tile.c: (gegl_tile_void_pyramid),
(gegl_tile_store):
* gegl/gegl-types.h:
* gegl/graph/gegl-node.c: (gegl_node_init), (finalize),
(gegl_node_invalidated), (gegl_node_get_bounding_box),
(gegl_node_lock), (gegl_node_unlock):
* gegl/graph/gegl-node.h:
* gegl/process/Makefile.am:
* gegl/process/gegl-eval-mgr.c: (gegl_eval_mgr_apply):
* gegl/process/gegl-have-visitor.c: (visit_node):
* gegl/process/gegl-processor.c: (render_rectangle):
* operations/Makefile-common.am:
2008-04-14 Øyvind Kolås <pippin@gimp.org>
s/Message/Command/g s/message/command/g, added some macros to
......
......@@ -25,7 +25,7 @@ BUFFER_sources = \
gegl-handler-log.c \
gegl-handler-zoom.c \
gegl-id-pool.c \
gegl-provider.c
gegl-source.c
BUFFER_headers = \
gegl-buffer-allocator.h \
......@@ -54,7 +54,7 @@ BUFFER_headers = \
gegl-handler-log.h \
gegl-handler-zoom.h \
gegl-id-pool.h \
gegl-provider.h
gegl-source.h
libbuffer_la_SOURCES = $(BUFFER_sources) $(BUFFER_headers)
......
......@@ -117,7 +117,7 @@ gegl_buffer_alloc (GeglBufferAllocator *allocator,
allocator->max_height = needed_height;
{ GeglBuffer *tmp = g_object_new (GEGL_TYPE_BUFFER,
"provider", allocator,
"source", allocator,
"x", x,
"y", y,
"width", width,
......@@ -210,7 +210,7 @@ gegl_buffer_new_from_format (const void *babl_format,
"path", path,
NULL);
allocator = g_object_new (GEGL_TYPE_BUFFER_ALLOCATOR,
"provider", storage,
"source", storage,
NULL);
g_object_unref (storage);
......@@ -224,7 +224,7 @@ gegl_buffer_new_from_format (const void *babl_format,
"format", babl_format,
NULL);
allocator = g_object_new (GEGL_TYPE_BUFFER_ALLOCATOR,
"provider", storage,
"source", storage,
NULL);
g_object_unref (storage);
g_hash_table_insert (allocators, (gpointer)babl_format, allocator);
......
......@@ -152,10 +152,10 @@ gegl_buffer_load (GeglBuffer *buffer,
gint factor = 1 << entry->z;
tile = gegl_provider_get_tile (GEGL_PROVIDER (buffer),
entry->x + info->x_tile_shift / factor,
entry->y + info->y_tile_shift / factor,
entry->z);
tile = gegl_source_get_tile (GEGL_SOURCE (buffer),
entry->x + info->x_tile_shift / factor,
entry->y + info->y_tile_shift / factor,
entry->z);
g_assert (tile);
gegl_tile_lock (tile);
......
......@@ -30,7 +30,7 @@
struct _GeglBuffer
{
GeglHandlers parent_instance; /* which is a GeglHandler which has a
provider field which is used for chaining
source field which is used for chaining
sub buffers with their anchestors */
GeglRectangle extent; /* the dimensions of the buffer */
......@@ -40,7 +40,7 @@ struct _GeglBuffer
gint shift_x; /* The relative offset of origins compared with */
gint shift_y; /* anchestral storage buffer, during */
/* construction relative to immediate provider */
/* construction relative to immediate source */
GeglRectangle abyss;
......
......@@ -231,7 +231,7 @@ gegl_buffer_save (GeglBuffer *buffer,
gint tx = gegl_tile_indice (tiledx / factor, tile_width);
gint ty = gegl_tile_indice (tiledy / factor, tile_height);
if (gegl_provider_exist (GEGL_PROVIDER (buffer), tx, ty, z))
if (gegl_source_exist (GEGL_SOURCE (buffer), tx, ty, z))
{
tx += info->x_tile_shift / factor;
ty += info->y_tile_shift / factor;
......@@ -293,10 +293,10 @@ gegl_buffer_save (GeglBuffer *buffer,
GeglTile *tile;
gint factor = 1 << entry->z;
tile = gegl_provider_get_tile (GEGL_PROVIDER (buffer),
entry->x - info->x_tile_shift / factor,
entry->y - info->y_tile_shift / factor,
entry->z);
tile = gegl_source_get_tile (GEGL_SOURCE (buffer),
entry->x - info->x_tile_shift / factor,
entry->y - info->y_tile_shift / factor,
entry->z);
g_assert (tile);
data = gegl_tile_get_data (tile);
g_assert (data);
......
......@@ -24,8 +24,8 @@ typedef struct _GeglSampler GeglSampler;
typedef struct _GeglTile GeglTile;
typedef struct _GeglTileClass GeglTileClass;
typedef struct _GeglProvider GeglProvider;
typedef struct _GeglProviderClass GeglProviderClass;
typedef struct _GeglSource GeglSource;
typedef struct _GeglSourceClass GeglSourceClass;
typedef struct _GeglTileBackend GeglTileBackend;
typedef struct _GeglTileBackendClass GeglTileBackendClass;
......
......@@ -233,12 +233,12 @@ gegl_buffer_dispose (GObject *object)
gegl_buffer_sample_cleanup (buffer);
if (handler->provider &&
GEGL_IS_BUFFER_ALLOCATOR (handler->provider))
if (handler->source &&
GEGL_IS_BUFFER_ALLOCATOR (handler->source))
{
gegl_buffer_void (buffer);
#if 0
handler->provider = NULL; /* this might be a dangerous way of marking that we have already voided */
handler->source = NULL; /* this might be a dangerous way of marking that we have already voided */
#endif
}
......@@ -257,14 +257,14 @@ gegl_buffer_dispose (GObject *object)
static GeglTileBackend *
gegl_buffer_backend (GeglBuffer *buffer)
{
GeglProvider *tmp = GEGL_PROVIDER (buffer);
GeglSource *tmp = GEGL_SOURCE (buffer);
if (!tmp)
return NULL;
do
{
tmp = GEGL_HANDLER (tmp)->provider;
tmp = GEGL_HANDLER (tmp)->source;
} while (tmp &&
/*GEGL_IS_TILE_TRAIT (tmp) &&*/
!GEGL_IS_TILE_BACKEND (tmp));
......@@ -278,11 +278,11 @@ gegl_buffer_backend (GeglBuffer *buffer)
static GeglStorage *
gegl_buffer_storage (GeglBuffer *buffer)
{
GeglProvider *tmp = GEGL_PROVIDER (buffer);
GeglSource *tmp = GEGL_SOURCE (buffer);
do
{
tmp = ((GeglHandler *) (tmp))->provider;
tmp = ((GeglHandler *) (tmp))->source;
} while (!GEGL_IS_STORAGE (tmp));
return (GeglStorage *) tmp;
......@@ -300,7 +300,7 @@ gegl_buffer_constructor (GType type,
GeglHandlers *handlers;
GeglTileBackend *backend;
GeglHandler *handler;
GeglProvider *provider;
GeglSource *source;
gint tile_width;
gint tile_height;
......@@ -309,27 +309,27 @@ gegl_buffer_constructor (GType type,
buffer = GEGL_BUFFER (object);
handlers = GEGL_HANDLERS (object);
handler = GEGL_HANDLER (object);
provider = handler->provider;
source = handler->source;
backend = gegl_buffer_backend (buffer);
if (provider)
if (source)
{
if (GEGL_IS_STORAGE (provider))
buffer->format = GEGL_STORAGE (provider)->format;
else if (GEGL_IS_BUFFER (provider))
buffer->format = GEGL_BUFFER (provider)->format;
if (GEGL_IS_STORAGE (source))
buffer->format = GEGL_STORAGE (source)->format;
else if (GEGL_IS_BUFFER (source))
buffer->format = GEGL_BUFFER (source)->format;
}
if (!provider)
if (!source)
{
/* if no provider is specified if a format is specified, we
/* if no source is specified if a format is specified, we
* we need to create our own
* provider (this adds a redirectin buffer in between for
* source (this adds a redirectin buffer in between for
* all "allocated from format", type buffers.
*/
g_assert (buffer->format);
provider = GEGL_PROVIDER (gegl_buffer_new_from_format (buffer->format,
source = GEGL_SOURCE (gegl_buffer_new_from_format (buffer->format,
buffer->extent.x,
buffer->extent.y,
buffer->extent.width,
......@@ -338,12 +338,12 @@ gegl_buffer_constructor (GType type,
* the top level behavior exhibited by this buffer object.
*/
g_object_set (buffer,
"provider", provider,
"source", source,
NULL);
g_object_unref (provider);
g_object_unref (source);
g_assert (provider);
backend = gegl_buffer_backend (GEGL_BUFFER (provider));
g_assert (source);
backend = gegl_buffer_backend (GEGL_BUFFER (source));
g_assert (backend);
}
......@@ -353,21 +353,21 @@ gegl_buffer_constructor (GType type,
tile_height = backend->tile_height;
if (buffer->extent.width == -1 &&
buffer->extent.height == -1) /* no specified extents, inheriting from provider */
buffer->extent.height == -1) /* no specified extents, inheriting from source */
{
if (GEGL_IS_BUFFER (provider))
if (GEGL_IS_BUFFER (source))
{
buffer->extent.x = GEGL_BUFFER (provider)->extent.x;
buffer->extent.y = GEGL_BUFFER (provider)->extent.y;
buffer->extent.width = GEGL_BUFFER (provider)->extent.width;
buffer->extent.height = GEGL_BUFFER (provider)->extent.height;
buffer->extent.x = GEGL_BUFFER (source)->extent.x;
buffer->extent.y = GEGL_BUFFER (source)->extent.y;
buffer->extent.width = GEGL_BUFFER (source)->extent.width;
buffer->extent.height = GEGL_BUFFER (source)->extent.height;
}
else if (GEGL_IS_STORAGE (provider))
else if (GEGL_IS_STORAGE (source))
{
buffer->extent.x = 0;
buffer->extent.y = 0;
buffer->extent.width = GEGL_STORAGE (provider)->width;
buffer->extent.height = GEGL_STORAGE (provider)->height;
buffer->extent.width = GEGL_STORAGE (source)->width;
buffer->extent.height = GEGL_STORAGE (source)->height;
}
}
......@@ -394,21 +394,21 @@ gegl_buffer_constructor (GType type,
else if (buffer->abyss.width == -1 ||
buffer->abyss.height == -1)
{
buffer->abyss.x = GEGL_BUFFER (provider)->abyss.x - buffer->shift_x;
buffer->abyss.y = GEGL_BUFFER (provider)->abyss.y - buffer->shift_y;
buffer->abyss.width = GEGL_BUFFER (provider)->abyss.width;
buffer->abyss.height = GEGL_BUFFER (provider)->abyss.height;
buffer->abyss.x = GEGL_BUFFER (source)->abyss.x - buffer->shift_x;
buffer->abyss.y = GEGL_BUFFER (source)->abyss.y - buffer->shift_y;
buffer->abyss.width = GEGL_BUFFER (source)->abyss.width;
buffer->abyss.height = GEGL_BUFFER (source)->abyss.height;
}
/* intersect our own abyss with parent's abyss if it exists
*/
if (GEGL_IS_BUFFER (provider))
if (GEGL_IS_BUFFER (source))
{
GeglRectangle parent = {
GEGL_BUFFER (provider)->abyss.x - buffer->shift_x,
GEGL_BUFFER (provider)->abyss.y - buffer->shift_y,
GEGL_BUFFER (provider)->abyss.width,
GEGL_BUFFER (provider)->abyss.height
GEGL_BUFFER (source)->abyss.x - buffer->shift_x,
GEGL_BUFFER (source)->abyss.y - buffer->shift_y,
GEGL_BUFFER (source)->abyss.width,
GEGL_BUFFER (source)->abyss.height
};
GeglRectangle request = {
buffer->abyss.x,
......@@ -426,14 +426,14 @@ gegl_buffer_constructor (GType type,
}
/* compute our own total shift <- this should probably happen approximatly first */
if (GEGL_IS_BUFFER (provider))
if (GEGL_IS_BUFFER (source))
{
GeglBuffer *provider_buf;
GeglBuffer *source_buf;
provider_buf = GEGL_BUFFER (provider);
source_buf = GEGL_BUFFER (source);
buffer->shift_x += provider_buf->shift_x;
buffer->shift_y += provider_buf->shift_y;
buffer->shift_x += source_buf->shift_x;
buffer->shift_y += source_buf->shift_y;
}
else
{
......@@ -461,20 +461,20 @@ gegl_buffer_constructor (GType type,
}
static GeglTile *
get_tile (GeglProvider *buffer,
gint x,
gint y,
gint z)
get_tile (GeglSource *buffer,
gint x,
gint y,
gint z)
{
GeglHandlers *handlers = (GeglHandlers*)(buffer);
GeglProvider *provider = ((GeglHandler*)buffer)->provider;
GeglSource *source = ((GeglHandler*)buffer)->source;
GeglTile *tile = NULL;
if (handlers->chain != NULL)
tile = gegl_provider_get_tile ((GeglProvider*)(handlers->chain->data),
tile = gegl_source_get_tile ((GeglSource*)(handlers->chain->data),
x, y, z);
else if (provider)
tile = gegl_provider_get_tile (provider, x, y, z);
else if (source)
tile = gegl_source_get_tile (source, x, y, z);
else
g_assert (0);
......@@ -512,7 +512,7 @@ get_tile (GeglProvider *buffer,
static gpointer
command (GeglProvider *buffer,
command (GeglSource *buffer,
GeglTileCommand command,
gint x,
gint y,
......@@ -528,14 +528,14 @@ static void
gegl_buffer_class_init (GeglBufferClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GeglProviderClass *tile_provider_class = GEGL_PROVIDER_CLASS (class);
GeglSourceClass *tile_source_class = GEGL_SOURCE_CLASS (class);
parent_class = g_type_class_peek_parent (class);
gobject_class->dispose = gegl_buffer_dispose;
gobject_class->constructor = gegl_buffer_constructor;
gobject_class->set_property = set_property;
gobject_class->get_property = get_property;
tile_provider_class->command = command;
tile_source_class->command = command;
g_object_class_install_property (gobject_class, PROP_PX_SIZE,
g_param_spec_int ("px-size", "pixel-size", "size of a single pixel in bytes.",
......@@ -556,12 +556,12 @@ gegl_buffer_class_init (GeglBufferClass *class)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_X,
g_param_spec_int ("x", "x", "local origin's offset relative to provider origin",
g_param_spec_int ("x", "x", "local origin's offset relative to source origin",
G_MININT, G_MAXINT, 0,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_Y,
g_param_spec_int ("y", "y", "local origin's offset relative to provider origin",
g_param_spec_int ("y", "y", "local origin's offset relative to source origin",
G_MININT, G_MAXINT, 0,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
......@@ -671,7 +671,7 @@ gegl_buffer_void (GeglBuffer *buffer)
if (z != 0 ||
tx >= buffer->min_x)
gegl_provider_command (GEGL_PROVIDER (buffer),
gegl_source_command (GEGL_SOURCE (buffer),
GEGL_TILE_VOID, tx, ty, z, NULL);
if (z != 0 ||
......@@ -748,7 +748,7 @@ pset (GeglBuffer *buffer,
gint tiledy = buffer_y + buffer->shift_y + y;
gint tiledx = buffer_x + buffer->shift_x + x;
GeglTile *tile = gegl_provider_get_tile ((GeglProvider *) (buffer),
GeglTile *tile = gegl_source_get_tile ((GeglSource *) (buffer),
gegl_tile_indice (tiledx, tile_width),
gegl_tile_indice (tiledy, tile_height),
0);
......@@ -833,7 +833,7 @@ pset (GeglBuffer *buffer,
g_object_unref (buffer->hot_tile);
buffer->hot_tile = NULL;
}
tile = gegl_provider_get_tile ((GeglProvider *) (buffer),
tile = gegl_source_get_tile ((GeglSource *) (buffer),
indice_x, indice_y,
0);
}
......@@ -918,7 +918,7 @@ pget (GeglBuffer *buffer,
g_object_unref (buffer->hot_tile);
buffer->hot_tile = NULL;
}
tile = gegl_provider_get_tile ((GeglProvider *) (buffer),
tile = gegl_source_get_tile ((GeglSource *) (buffer),
indice_x, indice_y,
0);
}
......@@ -1086,7 +1086,7 @@ gegl_buffer_iterate (GeglBuffer *buffer,
else
{
guchar *tile_base, *tp;
GeglTile *tile = gegl_provider_get_tile ((GeglProvider *) (buffer),
GeglTile *tile = gegl_source_get_tile ((GeglSource *) (buffer),
gegl_tile_indice (tiledx, tile_width),
gegl_tile_indice (tiledy, tile_height),
level);
......@@ -1230,7 +1230,7 @@ gegl_buffer_set (GeglBuffer *buffer,
if (format == NULL)
format = buffer->format;
/* FIXME: go through chain of providers up to but not including
/* FIXME: go through chain of sources up to but not including
* storage and disassociated Sampler */
if (rect && rect->width == 1 && rect->height == 1) /* fast path */
......@@ -1828,7 +1828,7 @@ gegl_buffer_create_sub_buffer (GeglBuffer *buffer,
extent = gegl_buffer_get_extent (buffer);
return g_object_new (GEGL_TYPE_BUFFER,
"provider", buffer,
"source", buffer,
"x", extent->x,
"y", extent->y,
"width", extent->width,
......
......@@ -98,13 +98,13 @@ dispose (GObject *object)
}
static GeglTile *
get_tile (GeglProvider *tile_store,
get_tile (GeglSource *tile_store,
gint x,
gint y,
gint z)
{
GeglHandlerCache *cache = GEGL_HANDLER_CACHE (tile_store);
GeglProvider *provider = GEGL_HANDLER (tile_store)->provider;
GeglSource *source = GEGL_HANDLER (tile_store)->source;
GeglTile *tile = NULL;
tile = gegl_handler_cache_get_tile (cache, x, y, z);
......@@ -115,8 +115,8 @@ get_tile (GeglProvider *tile_store,
}
cache->misses++;
if (provider)
tile = gegl_provider_get_tile (provider, x, y, z);
if (source)
tile = gegl_source_get_tile (source, x, y, z);
if (tile)
gegl_handler_cache_insert (cache, tile, x, y, z);
......@@ -126,7 +126,7 @@ get_tile (GeglProvider *tile_store,
static gpointer
command (GeglProvider *tile_store,
command (GeglSource *tile_store,
GeglTileCommand command,
gint x,
gint y,
......@@ -223,14 +223,14 @@ static void
gegl_handler_cache_class_init (GeglHandlerCacheClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GeglProviderClass *provider_class = GEGL_PROVIDER_CLASS (class);
GeglSourceClass *source_class = GEGL_SOURCE_CLASS (class);
gobject_class->set_property = set_property;
gobject_class->get_property = get_property;
gobject_class->finalize = finalize;
gobject_class->dispose = dispose;
provider_class->command = command;
source_class->command = command;
g_object_class_install_property (gobject_class, PROP_SIZE,
g_param_spec_int ("size",
......
......@@ -42,17 +42,17 @@ finalize (GObject *object)
}
static GeglTile *
get_tile (GeglProvider *gegl_provider,
gint x,
gint y,
gint z)
get_tile (GeglSource *gegl_source,
gint x,
gint y,
gint z)
{
GeglProvider *provider = GEGL_HANDLER (gegl_provider)->provider;
GeglHandlerEmpty *empty = GEGL_HANDLER_EMPTY (gegl_provider);
GeglSource *source = GEGL_HANDLER (gegl_source)->source;
GeglHandlerEmpty *empty = GEGL_HANDLER_EMPTY (gegl_source);
GeglTile *tile = NULL;
if (provider)
tile = gegl_provider_get_tile (provider, x, y, z);
if (source)
tile = gegl_source_get_tile (source, x, y, z);
if (tile != NULL)
return tile;
......@@ -131,7 +131,7 @@ constructor (GType type,
static gpointer
command (GeglProvider *buffer,
command (GeglSource *buffer,
GeglTileCommand command,
gint x,
gint y,
......@@ -148,13 +148,13 @@ static void
gegl_handler_empty_class_init (GeglHandlerEmptyClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GeglProviderClass *provider_class = GEGL_PROVIDER_CLASS (klass);
GeglSourceClass *source_class = GEGL_SOURCE_CLASS (klass);
gobject_class->constructor = constructor;
gobject_class->finalize = finalize;
gobject_class->set_property = set_property;
gobject_class->get_property = get_property;
provider_class->command = command;
source_class->command = command;
g_object_class_install_property (gobject_class, PROP_BACKEND,
g_param_spec_object ("backend",
......
......@@ -44,14 +44,14 @@ static char *commands[] =
};
static gpointer
command (GeglProvider *gegl_provider,
command (GeglSource *gegl_source,
GeglTileCommand command,
gint x,
gint y,
gint z,
gpointer data)
{
GeglHandler *handler = GEGL_HANDLER (gegl_provider);
GeglHandler *handler = GEGL_HANDLER (gegl_source);
gpointer result = NULL;
result = gegl_handler_chain_up (handler, command, x, y, z, data);
......@@ -62,7 +62,7 @@ command (GeglProvider *gegl_provider,
break;
default:
g_print ("(%s %p %p %i,%i,%i => %s)",
commands[command], (void *) gegl_provider, data, x, y, z,
commands[command], (void *) gegl_source, data, x, y, z,
result?"1":"0");
}
return result;
......@@ -71,9 +71,9 @@ command (GeglProvider *gegl_provider,
static void
gegl_handler_log_class_init (GeglHandlerLogClass *klass)
{
GeglProviderClass *provider_class = GEGL_PROVIDER_CLASS (klass);
GeglSourceClass *source_class = GEGL_SOURCE_CLASS (klass);
provider_class->command = command;
source_class->command = command;
}
static void
......
......@@ -190,22 +190,22 @@ static void inline set_half (GeglTile * dst_tile,
}
static GeglTile *
get_tile (GeglProvider *gegl_provider,
gint x,