Struct RasterCheck
pub struct RasterCheck { /* private fields */ }Expand description
A check that a retained target shows what a full render of the same
frame does: a frame repainted only where it changed must leave no stale
pixel. Debug and test builds run it on the frames they repaint in part.
The two images are read back asynchronously; Self::differences answers
once both are in.
Implementations§
§impl RasterCheck
impl RasterCheck
pub fn start(
_: (&Device, &Queue),
renderer: &mut Renderer,
target: RetainedTarget<'_>,
scene: &Scene,
_: (u32, u32),
base_color: AlphaColor<Srgb>,
scratch: Scratch,
) -> Result<RasterCheck, String>
pub fn start( _: (&Device, &Queue), renderer: &mut Renderer, target: RetainedTarget<'_>, scene: &Scene, _: (u32, u32), base_color: AlphaColor<Srgb>, scratch: Scratch, ) -> Result<RasterCheck, String>
Render scene in full beside target, which must already show it,
and start reading both back. scratch is the renderer’s
crate::render_bump_recovery::Overflows::scratch now.
§Errors
When the full render fails.
pub fn differences(&self, scratch: Scratch) -> Option<Readback>
pub fn differences(&self, scratch: Scratch) -> Option<Readback>
What reading the frames back said: how the pixels that differ fall on
the frame, so a stale repaint is found on the screen rather than only
counted, or why the frames could not be read. None while they are
not read yet.
scratch is the renderer’s
crate::render_bump_recovery::Overflows::scratch now: a renderer
whose reservation changed, or which collected an overflow, since the
check started may have dropped geometry from the frame it compares or
from the check’s own render of it, so a difference then proves
nothing and says what it saw instead.
Auto Trait Implementations§
impl Freeze for RasterCheck
impl !RefUnwindSafe for RasterCheck
impl Send for RasterCheck
impl Sync for RasterCheck
impl Unpin for RasterCheck
impl UnsafeUnpin for RasterCheck
impl !UnwindSafe for RasterCheck
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
§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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§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>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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