Trait smithay::backend::renderer::Renderer[][src]

pub trait Renderer {
    type Error: Error;
    type TextureId: Texture;
    type Frame: Frame<Error = Self::Error, TextureId = Self::TextureId>;
    fn render<F, R>(
        &mut self,
        size: Size<i32, Physical>,
        transform: Transform,
        rendering: F
    ) -> Result<R, Self::Error>
    where
        F: FnOnce(&mut Self, &mut Self::Frame) -> R
; }
Expand description

Abstraction of commonly used rendering operations for compositors.

Associated Types

Error type returned by the rendering operations of this renderer.

Texture Handle type used by this renderer.

Type representing a currently in-progress frame during the Renderer::render-call

Required methods

Initialize a rendering context on the current rendering target with given dimensions and transformation.

This function may error, if:

  • The given dimensions are unsupported (too large) for this renderer
  • The given Transformation is not supported by the renderer (Transform::Normal is always supported).
  • This renderer implements Bind, no target was bound and has no default target.
  • (Renderers not implementing Bind always have a default target.)

Implementors