Skip to content
  • Ell's avatar
    buffer: in swap backend, fix queued compressed-tile cost · a79978a4
    Ell authored
    In GeglTileBackendSwap, when compressing a queued tile while
    waiting for sufficient queue space, we allocate a tile-sized buffer
    to hold the compressed data (since we don't know the compressed
    data size in advance), hence the cost of the compressed tile in the
    queue is equal to the full tile size.  However, we would previously
    take its cost to be the compressed data size, which can be much
    lower, causing us to over-fill the queue.  Use the full tile size
    as the cost of queued compressed tiles to fix that.
    
    Furthermore, don't compress cloned queued tiles, whose cost is less
    than their data size, since this would increase their cost (these
    tiles will still be compressed upon writing.)
    a79978a4