SKGraphiteImageCache Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a bounded, least-recently-used cache of Graphite-backed textures keyed by source image, for reuse across recordings.
public sealed class SKGraphiteImageCache : IDisposable
- Inheritance
-
SKGraphiteImageCache
- Implements
Remarks
Use this cache as the callback body for CreateRecorder(Int64, SKGraphiteFindOrCreateImageDelegate, Action) so that repeatedly drawn images are uploaded to the GPU only once. The cache holds a reference to each cached texture until the entry is evicted or the cache is disposed.
This type implements IDisposable. Dispose it while its owning recorder is still alive so the cached textures can be released safely.
Constructors
| Name | Description |
|---|---|
| SKGraphiteImageCache() |
Initializes a new instance of the SKGraphiteImageCache class. |
Methods
| Name | Description |
|---|---|
| Dispose() |
Releases all cached textures held by the cache. |
| FindOrCreate(SKGraphiteRecorder, SKImage, Boolean) |
Returns the cached Graphite-backed texture for the specified image, uploading and caching it on the recorder if it is not already present. |