gegl-tile: make tile COW lock-free
Copy-on-write for tile data is currently implemented using a shared linked list among the cloned tiles, guarded by a global mutex. Replace the list with a shared counter, which is manipulated atomically, without a lock. For tiles created using gegl_tile_new(), and for uncloned tiles, the counter shares the same buffer as the tile data, so no additional allocation is required. Tiles created using gegl_tile_new_bare() get a separately-allocated counter.
parent
a0f3d035
Please register or sign in to comment