pub struct Subsurface { /* private fields */ }Expand description
An image’s surface under a window’s (see Display::subsurface).
Implementations§
Source§impl Subsurface
impl Subsurface
Sourcepub fn handle(&self) -> SurfaceHandle
pub fn handle(&self) -> SurfaceHandle
The handles to create a wgpu surface on; the wl_surface lives
as long as they do.
Sourcepub fn place(&mut self, rect: [i32; 4])
pub fn place(&mut self, rect: [i32; 4])
Places it at [x, y, width, height], in logical pixels of the
window’s surface (its buffer is scaled to that size). Applied with
the subsurface’s next commit and the window’s.
Sourcepub fn tag(
&mut self,
display: &mut Display,
primaries: NamedPrimaries,
transfer: NamedTransfer,
) -> Result<(), String>
pub fn tag( &mut self, display: &mut Display, primaries: NamedPrimaries, transfer: NamedTransfer, ) -> Result<(), String>
Declares its encoding to the compositor, with the perceptual
intent (the one every compositor takes); applied with its next
commit. The surface must not be presented to by a driver that
manages its colour itself
(Capabilities::wsi_claims_srgb_surfaces).
Sourcepub fn tagged(&self) -> Option<(NamedPrimaries, NamedTransfer)>
pub fn tagged(&self) -> Option<(NamedPrimaries, NamedTransfer)>
The encoding it was tagged with.
Trait Implementations§
Source§impl Debug for Subsurface
impl Debug for Subsurface
Auto Trait Implementations§
impl Freeze for Subsurface
impl !RefUnwindSafe for Subsurface
impl Send for Subsurface
impl Sync for Subsurface
impl Unpin for Subsurface
impl UnsafeUnpin for Subsurface
impl !UnwindSafe for Subsurface
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.