pub struct SurfacePresenter { /* private fields */ }Expand description
The pipeline that copies a rendered texture onto a presentation surface (a canvas, a
CAMetalLayer, an Android window), stretched to the surface’s size.
Implementations§
Source§impl SurfacePresenter
impl SurfacePresenter
Sourcepub fn new(device: &Device, format: TextureFormat) -> Self
pub fn new(device: &Device, format: TextureFormat) -> Self
A presenter drawing into surfaces of format.
Sourcepub fn draw(
&self,
device: &Device,
gpu: &GpuContext,
source: &TextureView,
target: &TextureView,
)
pub fn draw( &self, device: &Device, gpu: &GpuContext, source: &TextureView, target: &TextureView, )
Draws source over all of target and submits the work.
Auto Trait Implementations§
impl !RefUnwindSafe for SurfacePresenter
impl !UnwindSafe for SurfacePresenter
impl Forget for SurfacePresenter
impl Freeze for SurfacePresenter
impl Move for SurfacePresenter
impl Send for SurfacePresenter
impl Sync for SurfacePresenter
impl Unpin for SurfacePresenter
impl UnsafeUnpin for SurfacePresenter
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> 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