Renderer.SharedAssets

public 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 methods

abstract void

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

Public methods

onDestroy

Added in 1.1.0
@UiThread
abstract void onDestroy()

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