Renderer

public class Renderer

Known direct subclasses
Renderer.CanvasRenderer

Watch faces that require Canvas rendering should extend their Renderer from this class.

Renderer.GlesRenderer

Watch faces that require GLES20 rendering should extend their Renderer from this class.

Known indirect subclasses
ListenableCanvasRenderer

ListenableFuture-based compatibility wrapper around Renderer.CanvasRenderer's suspending methods.

ListenableGlesRenderer

ListenableFuture-based compatibility wrapper around Renderer.GlesRenderer's suspending methods.


The base class for CanvasRenderer and GlesRenderer. Renderers are constructed on a background thread but all rendering is done on the UiThread. There is a memory barrier between construction and rendering so no special threading primitives are required.

Summary

Nested types

Renderer.CanvasRenderer

Watch faces that require Canvas rendering should extend their Renderer from this class.

Renderer.GlesRenderer

Watch faces that require GLES20 rendering should extend their Renderer from this class.

Renderer.GlesRenderer.GlesException

Exception thrown if a GL call fails

Public fields

final @NonNull Collection<@NonNull Pair<@NonNull Integer, @NonNull ContentDescriptionLabel>>

Accessibility ContentDescriptionLabel for any rendered watch face elements other than the time and ComplicationSlots which are generated automatically.

final @Px float

The center x coordinate of the SurfaceHolder this Renderer renders into.

final @Px float

The center y coordinate of the SurfaceHolder this Renderer renders into.

final long

The interval in milliseconds between frames in interactive DrawModes.

final @NonNull RenderParameters