Module element

Module element 

Source
Expand description

Common base for elements that can be drawn by a Renderer

A RenderElement defines what should be drawn where. Additionally it provides the foundation for effective damage tracked rendering by allowing to query for damage between two CommitCounters.

For specialized renderers it can optionally provide access to the UnderlyingStorage of the element.

Out of the box smithay provides the following elements

  • memory - Memory based render element
  • texture - Texture based render element
  • surface - Wayland surface render element
  • solid - Solid color render element

The render_elements! macro provides an easy way to aggregate multiple different RenderElements into a single enum.

See the damage module for more information on damage tracking.

Modules§

memory
Element to render from RGBA memory
solid
Element to render a solid color
surfacewayland_frontend
Element to render a wayland surface
texture
Element to render a texture
utils
Utilities and helpers around the Element trait.

Macros§

render_elements
Aggregate multiple types implementing RenderElement into a single enum type

Structs§

Id
A unique id for a RenderElement
NamespacedElement
Element wrapper namespacing the Id of the internal element.
PrimaryScanoutOutput
Holds the primary scanout output for a surface
RenderElementState
Defines the element render state after rendering
RenderElementStates
Holds the states for a set of RenderElements
WeakId
A weak reference to a unique id for a RenderElement
Wrap
New-type wrapper for wrapping owned elements in render_elements!

Enums§

Kind
Defines the kind of an Element
RenderElementPresentationState
Defines the presentation state of an element after rendering
RenderingReason
Defines the (optional) reason why a Element was selected for rendering instead of direct scan-out
UnderlyingStorage
The underlying storage for a element

Traits§

AsRenderElements
Types that can be converted into RenderElements
Element
A single element
RenderElement
A single render element

Functions§

default_primary_scanout_output_compare
Default function for primary scan-out selection