pub struct WaylandSurfaceRenderElement<R: Renderer> { /* private fields */ }Available on crate feature
wayland_frontend only.Expand description
A single surface render element
Implementations§
Source§impl<R: Renderer + ImportAll> WaylandSurfaceRenderElement<R>
impl<R: Renderer + ImportAll> WaylandSurfaceRenderElement<R>
Sourcepub fn from_surface(
renderer: &mut R,
surface: &WlSurface,
states: &SurfaceData,
location: Point<f64, Physical>,
alpha: f32,
kind: Kind,
) -> Result<Option<Self>, R::Error>
pub fn from_surface( renderer: &mut R, surface: &WlSurface, states: &SurfaceData, location: Point<f64, Physical>, alpha: f32, kind: Kind, ) -> Result<Option<Self>, R::Error>
Create a render element from a surface
Sourcepub fn buffer_size(&self) -> Size<i32, Logical>
pub fn buffer_size(&self) -> Size<i32, Logical>
Get the buffer dimensions in logical coordinates
Sourcepub fn view(&self) -> SurfaceView
pub fn view(&self) -> SurfaceView
Get the view into the surface
Sourcepub fn texture(&self) -> &WaylandSurfaceTexture<R>
pub fn texture(&self) -> &WaylandSurfaceTexture<R>
Get the buffer texture
Trait Implementations§
Source§impl<R: Renderer> Debug for WaylandSurfaceRenderElement<R>
impl<R: Renderer> Debug for WaylandSurfaceRenderElement<R>
Source§impl<R: Renderer + ImportAll> Element for WaylandSurfaceRenderElement<R>
impl<R: Renderer + ImportAll> Element for WaylandSurfaceRenderElement<R>
Source§fn current_commit(&self) -> CommitCounter
fn current_commit(&self) -> CommitCounter
Get the current commit position of this element
Source§fn geometry(&self, scale: Scale<f64>) -> Rectangle<i32, Physical>
fn geometry(&self, scale: Scale<f64>) -> Rectangle<i32, Physical>
Get the geometry relative to the output
Source§fn damage_since(
&self,
scale: Scale<f64>,
commit: Option<CommitCounter>,
) -> DamageSet<i32, Physical>
fn damage_since( &self, scale: Scale<f64>, commit: Option<CommitCounter>, ) -> DamageSet<i32, Physical>
Get the damage since the provided commit relative to the element
Source§fn opaque_regions(&self, scale: Scale<f64>) -> OpaqueRegions<i32, Physical>
fn opaque_regions(&self, scale: Scale<f64>) -> OpaqueRegions<i32, Physical>
Get the opaque regions of the element relative to the element
Source§fn alpha(&self) -> f32
fn alpha(&self) -> f32
Returns an alpha value the element should be drawn with regardless of any
already encoded alpha in it’s underlying representation.
Source§fn location(&self, scale: Scale<f64>) -> Point<i32, Physical>
fn location(&self, scale: Scale<f64>) -> Point<i32, Physical>
Get the location relative to the output
Source§fn is_framebuffer_effect(&self) -> bool
fn is_framebuffer_effect(&self) -> bool
Returns whether this elements is a “framebuffer effect”. Read more
Source§impl<R, E> From<WaylandSurfaceRenderElement<R>> for SpaceRenderElements<R, E>
Available on crate feature desktop only.A single wayland surface
impl<R, E> From<WaylandSurfaceRenderElement<R>> for SpaceRenderElements<R, E>
Available on crate feature
desktop only.A single wayland surface
Source§fn from(field: WaylandSurfaceRenderElement<R>) -> SpaceRenderElements<R, E>
fn from(field: WaylandSurfaceRenderElement<R>) -> SpaceRenderElements<R, E>
Converts to this type from the input type.
Source§impl<R> RenderElement<R> for WaylandSurfaceRenderElement<R>
impl<R> RenderElement<R> for WaylandSurfaceRenderElement<R>
Source§fn underlying_storage(&self, _renderer: &mut R) -> Option<UnderlyingStorage<'_>>
fn underlying_storage(&self, _renderer: &mut R) -> Option<UnderlyingStorage<'_>>
Get the underlying storage of this element, may be used to optimize rendering (eg. drm planes)
Source§fn draw(
&self,
frame: &mut R::Frame<'_, '_>,
src: Rectangle<f64, BufferCoords>,
dst: Rectangle<i32, Physical>,
damage: &[Rectangle<i32, Physical>],
opaque_regions: &[Rectangle<i32, Physical>],
_cache: Option<&UserDataMap>,
) -> Result<(), R::Error>
fn draw( &self, frame: &mut R::Frame<'_, '_>, src: Rectangle<f64, BufferCoords>, dst: Rectangle<i32, Physical>, damage: &[Rectangle<i32, Physical>], opaque_regions: &[Rectangle<i32, Physical>], _cache: Option<&UserDataMap>, ) -> Result<(), R::Error>
Draw this element Read more
Source§fn capture_framebuffer(
&self,
frame: &mut R::Frame<'_, '_>,
src: Rectangle<f64, BufferCoords>,
dst: Rectangle<i32, Physical>,
cache: &UserDataMap,
) -> Result<(), R::Error>
fn capture_framebuffer( &self, frame: &mut R::Frame<'_, '_>, src: Rectangle<f64, BufferCoords>, dst: Rectangle<i32, Physical>, cache: &UserDataMap, ) -> Result<(), R::Error>
Notification, that the underlying framebuffer has changed allowing the element
to blit the contents of the
frame. Read moreAuto Trait Implementations§
impl<R> Freeze for WaylandSurfaceRenderElement<R>
impl<R> !RefUnwindSafe for WaylandSurfaceRenderElement<R>
impl<R> Send for WaylandSurfaceRenderElement<R>
impl<R> Sync for WaylandSurfaceRenderElement<R>
impl<R> Unpin for WaylandSurfaceRenderElement<R>
impl<R> !UnwindSafe for WaylandSurfaceRenderElement<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.