pub struct SourceView<'a> { /* private fields */ }Expand description
A borrowed source picture: on the GPU a RenderedTexture, an crate::UploadTexture, or
(via wgpu interop) any view on the renderer’s device; on the CPU a crate::CpuSource.
Sources store premultiplied sRGB RGBA (in a non-sRGB GPU format). The owner keeps it alive
and unchanged until the frame drawn from it is submitted (GPU) or rendered (CPU). Passing a
source of the other backend fails with RenderError::InvalidSource.
Implementations§
Source§impl<'a> SourceView<'a>
impl<'a> SourceView<'a>
Trait Implementations§
Source§impl<'a> Clone for SourceView<'a>
impl<'a> Clone for SourceView<'a>
impl<'a> Copy for SourceView<'a>
Source§impl<'a> Debug for SourceView<'a>
impl<'a> Debug for SourceView<'a>
Source§impl<'a> From<&'a CpuSource> for SourceView<'a>
impl<'a> From<&'a CpuSource> for SourceView<'a>
Source§impl<'a> From<&'a RenderedTexture> for SourceView<'a>
impl<'a> From<&'a RenderedTexture> for SourceView<'a>
Source§fn from(texture: &'a RenderedTexture) -> Self
fn from(texture: &'a RenderedTexture) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a UploadTexture> for SourceView<'a>
impl<'a> From<&'a UploadTexture> for SourceView<'a>
Source§fn from(texture: &'a UploadTexture) -> Self
fn from(texture: &'a UploadTexture) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SourceView<'a>
impl<'a> !UnwindSafe for SourceView<'a>
impl<'a> Freeze for SourceView<'a>
impl<'a> Send for SourceView<'a>
impl<'a> Sync for SourceView<'a>
impl<'a> Unpin for SourceView<'a>
impl<'a> UnsafeUnpin for SourceView<'a>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more