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 !Freeze for SurfacePresenter
impl !RefUnwindSafe for SurfacePresenter
impl !UnwindSafe for SurfacePresenter
impl Forget for SurfacePresenter
impl Move for SurfacePresenter
impl Send for SurfacePresenter
impl Sync for SurfacePresenter
impl Unpin for SurfacePresenterwhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const u8 is !null: Unpin,
Arc<CoreTexture>: Unpin,
&'static str: Unpin,
InternalBitFlags: Unpin,
&'static [TextureFormat]: Unpin,
Arc<CoreBuffer>: Unpin,
Arc<Mutex<MapContext>>: Unpin,
InternalBitFlags: Unpin,
Box<[Bound]>: Unpin,
Arc<CoreBindGroup>: Unpin,
Arc<CoreBindGroupLayout>: Unpin,
Arc<CoreTextureView>: Unpin,
Arc<CoreSampler>: Unpin,
NonZero<u64>: Unpin,
Arc<CoreRenderPipeline>: Unpin,
impl UnsafeUnpin for SurfacePresenterwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(Texture, ())>: UnsafeUnpin,
PhantomData<(Buffer, ())>: UnsafeUnpin,
PhantomData<(Box<[Bound]>, Kept)>: UnsafeUnpin,
PhantomData<Bound>: UnsafeUnpin,
*const ArcInner<CoreBindGroupLayout> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreBindGroupLayout>>: UnsafeUnpin,
*const ArcInner<CoreRenderPipeline> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreRenderPipeline>>: UnsafeUnpin,
*const ArcInner<CoreBindGroup> is !null: UnsafeUnpin,
PhantomData<ArcInner<CoreBindGroup>>: UnsafeUnpin,
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