Renderer.SharedAssets


interface Renderer.SharedAssets


Multiple WatchFaceService instances and hence Renderers can exist concurrently (e.g. a headless instance and an interactive instance) and using SharedAssets allows memory to be saved by sharing immutable data (e.g. Bitmaps and shaders) between them.

Note SharedAssets will be constructed on a background thread, but (typically) used and released on the ui thread.

Summary

Public functions

Unit

This function is deprecated. AndroidX watchface libraries are deprecated, use Watch Face Format instead.

Public functions

onDestroy

Added in 1.1.0
Deprecated in 1.3.0-alpha06
@UiThread
fun onDestroy(): Unit

Notification that any resources owned by SharedAssets should be released, called when no renderer instances are left.