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

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

Public functions

onDestroy

Added in 1.1.0
@UiThread
fun onDestroy(): Unit

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