argbImageSource

actual fun argbImageSource(key: Any, factory: suspend () -> ArgbImage?): ImageSource

Wrap a lazily produced ArgbImage as an ImageSource. factory runs off the render thread when the image is first needed and may return null when the pixels turn out to be unavailable; it may also be called again after a texture eviction, so it must stay repeatable.

key is the source's cache identity: two image sources built with equal keys are the same texture as far as the render-resource cache is concerned. Pass something stable and comparable (a tile address, say) so a re-created tile reuses its uploaded texture instead of decoding again.

expect fun argbImageSource(key: Any, factory: suspend () -> ArgbImage?): ImageSource

Wrap a lazily produced ArgbImage as an ImageSource. factory runs off the render thread when the image is first needed and may return null when the pixels turn out to be unavailable; it may also be called again after a texture eviction, so it must stay repeatable.

key is the source's cache identity: two image sources built with equal keys are the same texture as far as the render-resource cache is concerned. Pass something stable and comparable (a tile address, say) so a re-created tile reuses its uploaded texture instead of decoding again.

actual fun argbImageSource(key: Any, factory: suspend () -> ArgbImage?): ImageSource

Wrap a lazily produced ArgbImage as an ImageSource. factory runs off the render thread when the image is first needed and may return null when the pixels turn out to be unavailable; it may also be called again after a texture eviction, so it must stay repeatable.

key is the source's cache identity: two image sources built with equal keys are the same texture as far as the render-resource cache is concerned. Pass something stable and comparable (a tile address, say) so a re-created tile reuses its uploaded texture instead of decoding again.

actual fun argbImageSource(key: Any, factory: suspend () -> ArgbImage?): ImageSource

Wrap a lazily produced ArgbImage as an ImageSource. factory runs off the render thread when the image is first needed and may return null when the pixels turn out to be unavailable; it may also be called again after a texture eviction, so it must stay repeatable.

key is the source's cache identity: two image sources built with equal keys are the same texture as far as the render-resource cache is concerned. Pass something stable and comparable (a tile address, say) so a re-created tile reuses its uploaded texture instead of decoding again.

actual fun argbImageSource(key: Any, factory: suspend () -> ArgbImage?): ImageSource

Wrap a lazily produced ArgbImage as an ImageSource. factory runs off the render thread when the image is first needed and may return null when the pixels turn out to be unavailable; it may also be called again after a texture eviction, so it must stay repeatable.

key is the source's cache identity: two image sources built with equal keys are the same texture as far as the render-resource cache is concerned. Pass something stable and comparable (a tile address, say) so a re-created tile reuses its uploaded texture instead of decoding again.