Table of Contents

Class SKImagePyramidMemoryTileCache

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

LRU cache for decoded tile images. Evicted tiles are deferred for disposal to avoid race conditions with the renderer. Call FlushEvicted() at the start of each render frame.

public sealed class SKImagePyramidMemoryTileCache : ISKImagePyramidTileCache, IDisposable
Inheritance
SKImagePyramidMemoryTileCache
Implements
Inherited Members

Constructors

SKImagePyramidMemoryTileCache(int)

Properties

Count

Current number of cached tiles.

MaxEntries

Maximum number of cached tiles.

Methods

Clear()

Clears all cached tiles.

Contains(SKImagePyramidTileId)

Checks if a tile is in the cache.

Dispose()
FlushEvicted()

Disposes tiles evicted since the last call. Call this at the start of each render frame on the UI thread.

Put(SKImagePyramidTileId, SKImagePyramidTile)

Adds a tile to the cache, evicting the LRU entry if at capacity.

Remove(SKImagePyramidTileId)

Removes a specific tile from the cache.

TryGet(SKImagePyramidTileId, out SKImagePyramidTile?)

Tries to get a cached tile.