-
Ell authored
GEGL_TILE_COPY requests a tile source to copy a tile to a given destination buffer (or to the same buffer to which the tile source belongs), at given destination tile coordinates. The tile source and the destination buffer are assumed to be tile-compatible (i.e., having the same tile dimensions and format). The tile source should return a boolean value, indicating whether the tile has been copied. This is mostly meant to be implemented by the cache handler, and by tile backends (the swap backend, in particular). It allows backends to implement a cheap copy operation, avoiding the need to actually fetch the tile. For example, at the moment, copying a swapped-out tile between two buffers, both of which are using the swap backend, requires reading the tile from disk into memory first, only to COW the result. This might not be an issue if the same tile is known to be accessed shortly after, but when doing a tentative copy, usually of an entire buffer (as is done in GIMP in several cases), this incurs a very noticeable overhead.
c5045711