pub enum RenderTarget {
Swapchain(SurfaceState),
}Expand description
Where a drawn frame lands.
A swapchain is a compositor’s: it hands out a texture, takes it back, and shows it. A texture is the caller’s, and nobody shows it — which is the only difference, and the reason a frame can be inspected without a compositor at all. Everything upstream of here draws the same commands either way.
Variants§
Swapchain(SurfaceState)
The compositor’s swapchain. Acquired per frame, presented after.
Implementations§
Source§impl RenderTarget
impl RenderTarget
pub fn width(&self) -> u32
pub fn height(&self) -> u32
Sourcepub fn resize(&mut self, width: u32, height: u32)
pub fn resize(&mut self, width: u32, height: u32)
A swapchain is reconfigured; a texture is replaced.
Not a no-op for the texture, however tempting: resolve_geometry asks
whether the target matches the frame and calls this when it does not, so
a target that quietly declined would report a resize every frame for
ever, repainting the whole tree each time and defeating the incremental
paint the rest of the pipeline is built around.
pub fn device(&self) -> &Arc<Device> ⓘ
pub fn queue(&self) -> &Arc<Queue> ⓘ
pub fn format(&self) -> TextureFormat
Auto Trait Implementations§
impl !Freeze for RenderTarget
impl !RefUnwindSafe for RenderTarget
impl !UnwindSafe for RenderTarget
impl Send for RenderTarget
impl Sync for RenderTarget
impl Unpin for RenderTarget
impl UnsafeUnpin for RenderTarget
Blanket Implementations§
Source§impl<T, M, S> Animate<T, M> for Swhere
T: Clone + 'static,
S: IntoSignal<T, M>,
impl<T, M, S> Animate<T, M> for Swhere
T: Clone + 'static,
S: IntoSignal<T, M>,
Source§fn transition(self, transition: impl Into<TransitionConfig>) -> Animated<T>
fn transition(self, transition: impl Into<TransitionConfig>) -> Animated<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.