layers

Module prelude

Source

Re-exports§

Modules§

Structs§

Enums§

  • Errors returned by layer and engine operations.
  • Shape defines the visual boundary of a layer.

Traits§

Functions§

  • Drop every cached subtree buffer, freeing all retained render surfaces and image snapshots. Useful on teardown or when the whole plane set is rebuilt. Must run on the render thread.
  • Draw the scene to the given skia::Canvas
  • Drop the cached subtree buffer for root, freeing its render surface and image snapshot. Call this when a plane is retired (e.g. its window closed) so its buffer doesn’t linger in the cache for the lifetime of the process — the cache is only ever populated on render and is not otherwise evicted. Returns true if an entry was present. Must run on the render thread (same thread that called render_subtree_to_buffer).
  • Render a node and his subtree in the provided canvas taking care of the image caching if needed
  • Render a single subtree root into its own buffer, for an external compositor (e.g. a KMS/DRM plane). Re-renders only when the subtree’s content or the supplied backdrop changed since the last call for this root; otherwise returns the cached buffer (SubtreeBuffer::from_cache == true).

Type Aliases§

  • Image describes a two dimensional array of pixels to draw. The pixels may be decoded in a raster bitmap, encoded in a Picture or compressed data stream, or located in GPU memory as a GPU texture.