GeglTile
typedef struct {
/* GObject parent_instance;*/
gint ref_count;
guchar *data; /* actual pixel data for tile, a linear buffer*/
gint size; /* The size of the linear buffer */
GeglTileStorage *tile_storage; /* the buffer from which this tile was
* retrieved needed for the tile to be able to
* store itself back (for instance when it is
* unreffed for the last time)
*/
gint x, y, z;
guint rev; /* this tile revision */
guint stored_rev; /* what revision was we when we from tile_storage?
(currently set to 1 when loaded from disk */
gint lock_count; /* number of outstanding write locks */
gint read_lock_count; /* number of outstanding read locks */
guint is_zero_tile:1; /* whether the tile data is fully zeroed
* (allowing for false negatives, but not
* false positives)
*/
guint is_global_tile:1; /* whether the tile data is global (and
* therefore can never be owned by a
* single mutable tile)
*/
guint keep_identity:1; /* maintain data pointer identity, rather
* than data content only
*/
gint clone_state; /* tile clone/unclone state & spinlock */
gint *n_clones; /* an array of two atomic counters, shared
* among all tiles sharing the same data.
* the first counter indicates the number of
* tiles sharing the data, and the second
* counter indicates how many of those tiles
* are in the cache.
*/
guint64 damage;
/* called when the tile is about to be destroyed */
GDestroyNotify destroy_notify;
gpointer destroy_notify_data;
/* called when the tile has been unlocked which typically means tile
* data has changed
*/
GeglTileCallback unlock_notify;
gpointer unlock_notify_data;
} GeglTile;
GeglTileHandler
typedef struct {
GeglTileSource parent_instance;
GeglTileSource *source; /* The source of the data, which we can rely
on if our command handler doesn't handle
a command, this is typically done with
gegl_tile_handler_source_command passing
ourself as the first parameter. */
GeglTileHandlerPrivate *priv;
} GeglTileHandler;