pub enum ImageSkip {
AtlasDisabled,
UnsupportedFormat(ImageFormat),
DegenerateExtent {
width: u32,
height: u32,
},
TooLarge {
width: u32,
height: u32,
max: u32,
},
MalformedPixels {
width: u32,
height: u32,
expected: usize,
actual: usize,
},
SingularTransform,
NoAtlasSpace {
width: u32,
height: u32,
atlas_width: u32,
atlas_height: u32,
},
SameFrameExtentConflict {
width: u32,
height: u32,
},
}Expand description
Why one image could not be made resident.
Every variant is a skip, never a frame failure: the draw paints nothing and the rest of the frame proceeds. They are distinguished because the remedies differ — a too-large image is an application decision, an exhausted atlas is a budget one, and a disabled atlas is the operator’s own doing.
Variants§
AtlasDisabled
FRUST_ENGINE_NO_ATLAS is set; the atlas is out of the frame entirely.
UnsupportedFormat(ImageFormat)
The image declares a format the atlas does not store.
DegenerateExtent
The image has no area, so there is nothing to make resident.
TooLarge
The image is larger than MAX_IMAGE_DIMENSION on at least one axis.
Fields
MalformedPixels
The pixel buffer’s length disagrees with the declared extent and format.
Fields
SingularTransform
The paint transform cannot be inverted, so there is no device-to-image mapping for the shader to sample through.
NoAtlasSpace
The image fits the ceiling but not the configured atlas budget, and no resident image could be evicted to make room for it — either the atlas holds nothing but images this same frame drew, or what it holds beside them still leaves no rectangle this one fits in.
Fields
SameFrameExtentConflict
The same blob was already resolved earlier in this same frame at a different extent.
Not an atlas-capacity refusal: the atlas may be nearly empty. The plan clears before it uploads (see the module doc), so releasing this blob’s rectangle to make room for its own second extent would schedule a clear over texels this frame already sampled — the first extent’s draw keeps its texels and the second is skipped until the next frame instead.
Fields
width: u32The refused extent’s width, after fit_extent the same way
NoAtlasSpace reports it.
height: u32The refused extent’s height, after fit_extent.
Trait Implementations§
impl Copy for ImageSkip
impl Eq for ImageSkip
Source§impl Error for ImageSkip
impl Error for ImageSkip
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for ImageSkip
Auto Trait Implementations§
impl Freeze for ImageSkip
impl RefUnwindSafe for ImageSkip
impl Send for ImageSkip
impl Sync for ImageSkip
impl Unpin for ImageSkip
impl UnsafeUnpin for ImageSkip
impl UnwindSafe for ImageSkip
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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.