pub struct PixelBuffer { /* private fields */ }Expand description
A frame read back from a renderer, as raw pixels.
This is the engine’s own type rather than an image::RgbaImage because the contract is what
every renderer implements, and an image codec crate is not something a renderer needs: the
consumers that want one — a PNG in test support, a fixture diff, an export — sit above the
engine and convert. image was a dependency of this crate for this signature alone.
The layout is fixed so that the boundary needs no negotiation: RGBA8, unpremultiplied, tightly packed, row-major, top-left origin. A backend whose target is BGRA or premultiplied converts while it copies, which is where the swizzle already happens; a backend with other pixel formats widens this type rather than smuggling a second layout through it.
Implementations§
Trait Implementations§
Source§impl Clone for PixelBuffer
impl Clone for PixelBuffer
Source§impl Debug for PixelBuffer
impl Debug for PixelBuffer
impl Eq for PixelBuffer
Source§impl PartialEq for PixelBuffer
impl PartialEq for PixelBuffer
impl StructuralPartialEq for PixelBuffer
Auto Trait Implementations§
impl Freeze for PixelBuffer
impl RefUnwindSafe for PixelBuffer
impl Send for PixelBuffer
impl Sync for PixelBuffer
impl Unpin for PixelBuffer
impl UnsafeUnpin for PixelBuffer
impl UnwindSafe for PixelBuffer
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
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.