RenderResourceCache

actual open class RenderResourceCache : LruMemoryCache<Any, RenderResource> , GLSurfaceView.EGLContextFactory
actual open class RenderResourceCache : LruMemoryCache<Any, RenderResource>

iOS render-resource cache with the async retrieval pipeline wired up. Mirrors the JVM version's structure: separate retrieval queues for remote (URL) vs local (resource/file) sources, an absent-resource list to suppress repeated retries on missing tiles, and an eviction queue so GL deletes happen on the GL thread (releaseEvictedResources called from WorldWindow.doFrame).

actual open class RenderResourceCache : LruMemoryCache<Any, RenderResource>
actual open class RenderResourceCache : LruMemoryCache<Any, RenderResource>

Constructors

Link copied to clipboard
constructor(context: Context, capacity: Long = recommendedCapacity(context), lowWater: Long = (capacity * 0.75).toLong())
constructor(capacity: Long = recommendedCapacity(), lowWater: Long = (capacity * 0.75).toLong())
constructor(capacity: Long = recommendedCapacity(), lowWater: Long = (capacity * 0.75).toLong())
constructor(capacity: Long = recommendedCapacity(), lowWater: Long = (capacity * 0.75).toLong())

Types

Companion
Link copied to clipboard
object Companion
object Companion
object Companion
object Companion

Properties

Link copied to clipboard
actual val absentResourceList: AbsentResourceList<Int>

Identifies requested resources that whose retrieval failed.

actual val absentResourceList: AbsentResourceList<Int>
actual val absentResourceList: AbsentResourceList<Int>

Identifies requested resources that whose retrieval failed.

actual val absentResourceList: AbsentResourceList<Int>

Identifies requested resources that whose retrieval failed.

capacity
Link copied to clipboard
Link copied to clipboard
entryCount
Link copied to clipboard
imageDecoder
Link copied to clipboard
localRetrievalQueueSize
Link copied to clipboard
Link copied to clipboard
actual val mainScope: CoroutineScope

Main render resource retrieval scope

expect val mainScope: CoroutineScope
actual val mainScope: CoroutineScope
actual val mainScope: CoroutineScope

Main render resource retrieval scope

actual val mainScope: CoroutineScope

Main render resource retrieval scope

remoteRetrievalQueueSize
Link copied to clipboard

Maximum concurrent retrievals per source category. Tuned conservatively: more than this in flight per category just thrashes the cache and buffers more half-decoded images. Increase for high-throughput tile streams; the GL thread is still the serialization point at upload time.

usedCapacity
Link copied to clipboard

Functions

clear
Link copied to clipboard
open override fun clear()
open fun clear()
open override fun clear()
open override fun clear()
open override fun clear()
containsKey
Link copied to clipboard
open fun containsKey(key: Any): Boolean
expect open fun containsKey(key: Any): Boolean
open fun containsKey(key: Any): Boolean
open fun containsKey(key: Any): Boolean
open fun containsKey(key: Any): Boolean
Link copied to clipboard
open override fun createContext(egl: EGL10, display: EGLDisplay, eglConfig: EGLConfig): EGLContext
Link copied to clipboard
open override fun destroyContext(egl: EGL10, display: EGLDisplay, context: EGLContext)
get
Link copied to clipboard
open operator fun get(key: Any): RenderResource?
expect open operator fun get(key: Any): RenderResource?
open operator fun get(key: Any): RenderResource?
open operator fun get(key: Any): RenderResource?
open operator fun get(key: Any): RenderResource?
Link copied to clipboard
actual fun imageSourceFromAssetPath(assets: ResourceContainer<AssetResource>, path: String): ImageSource?
expect fun imageSourceFromAssetPath(assets: ResourceContainer<AssetResource>, path: String): ImageSource?
actual fun imageSourceFromAssetPath(assets: ResourceContainer<AssetResource>, path: String): ImageSource?
actual fun imageSourceFromAssetPath(assets: ResourceContainer<AssetResource>, path: String): ImageSource?
actual fun imageSourceFromAssetPath(assets: ResourceContainer<AssetResource>, path: String): ImageSource?
Link copied to clipboard
actual fun incAge()
expect fun incAge()
actual fun incAge()
actual fun incAge()
actual fun incAge()
put
Link copied to clipboard
open fun put(key: Any, value: RenderResource, size: Int): RenderResource?
expect open fun put(key: Any, value: RenderResource, size: Int): RenderResource?
open fun put(key: Any, value: RenderResource, size: Int): RenderResource?
open fun put(key: Any, value: RenderResource, size: Int): RenderResource?
open fun put(key: Any, value: RenderResource, size: Int): RenderResource?
Link copied to clipboard
actual fun releaseEvictedResources(dc: DrawContext)
actual fun releaseEvictedResources(dc: DrawContext)
actual fun releaseEvictedResources(dc: DrawContext)
actual fun releaseEvictedResources(dc: DrawContext)
remove
Link copied to clipboard
open fun remove(key: Any): RenderResource?
expect open fun remove(key: Any): RenderResource?
open fun remove(key: Any): RenderResource?
open fun remove(key: Any): RenderResource?
open fun remove(key: Any): RenderResource?
Link copied to clipboard
actual fun retrieveTextAsset(assetResource: AssetResource, result: (String) -> Unit)
expect fun retrieveTextAsset(assetResource: AssetResource, result: (String) -> Unit)
actual fun retrieveTextAsset(assetResource: AssetResource, result: (String) -> Unit)
actual fun retrieveTextAsset(assetResource: AssetResource, result: (String) -> Unit)
actual fun retrieveTextAsset(assetResource: AssetResource, result: (String) -> Unit)
Link copied to clipboard
actual fun retrieveTextFile(fileResource: FileResource, result: (String) -> Unit)
expect fun retrieveTextFile(fileResource: FileResource, result: (String) -> Unit)
actual fun retrieveTextFile(fileResource: FileResource, result: (String) -> Unit)
actual fun retrieveTextFile(fileResource: FileResource, result: (String) -> Unit)
actual fun retrieveTextFile(fileResource: FileResource, result: (String) -> Unit)
Link copied to clipboard
actual fun retrieveTexture(imageSource: ImageSource, options: ImageOptions?): Texture?
expect fun retrieveTexture(imageSource: ImageSource, options: ImageOptions?): Texture?
actual fun retrieveTexture(imageSource: ImageSource, options: ImageOptions?): Texture?
actual fun retrieveTexture(imageSource: ImageSource, options: ImageOptions?): Texture?
actual fun retrieveTexture(imageSource: ImageSource, options: ImageOptions?): Texture?
Link copied to clipboard
fun trimStale(staleAge: Long = STALE_AGE)

Release resources used later than staleAge frames ago

trimToAge
Link copied to clipboard
open fun trimToAge(maxAge: Long): Int
open fun trimToAge(maxAge: Long): Int
open fun trimToAge(maxAge: Long): Int
open fun trimToAge(maxAge: Long): Int
open fun trimToAge(maxAge: Long): Int
updateSize
Link copied to clipboard
open fun updateSize(key: Any, newSize: Int): Unit?
expect open fun updateSize(key: Any, newSize: Int): Unit?
open fun updateSize(key: Any, newSize: Int): Unit?
open fun updateSize(key: Any, newSize: Int): Unit?
open fun updateSize(key: Any, newSize: Int): Unit?