pub struct SurfaceFormat { /* private fields */ }Expand description
The Linux surface transport, re-exported so an application reaches it through the platform crate it already depends on rather than through the engine. Every dimension of a surface format: the full shape a GPU importer needs to sample a buffer.
Built only here — its fields are private and its constructors are private — so it is always one of
the shapes a SurfaceFormatKind admits, and a renderer reads it rather than inventing it.
Implementations§
Source§impl SurfaceFormat
impl SurfaceFormat
Sourcepub const fn model(&self) -> ColorModel
pub const fn model(&self) -> ColorModel
How the colour is modelled.
Sourcepub const fn subsampling(&self) -> Subsampling
pub const fn subsampling(&self) -> Subsampling
How much colour detail the chroma carries.
Sourcepub const fn layout(&self) -> PlaneLayout
pub const fn layout(&self) -> PlaneLayout
How the planes are arranged.
Sourcepub const fn rgb_order(&self) -> RgbOrder
pub const fn rgb_order(&self) -> RgbOrder
The order of an RGB surface’s first two components; meaningless for YCbCr.
Sourcepub const fn chroma_order(&self) -> ChromaOrder
pub const fn chroma_order(&self) -> ChromaOrder
The order of the chroma components; meaningless for RGB.
Sourcepub const fn depth(&self) -> SampleDepth
pub const fn depth(&self) -> SampleDepth
The nominal bits of a sample.
Sourcepub const fn container(&self) -> SampleContainer
pub const fn container(&self) -> SampleContainer
The word a sample is stored in.
Sourcepub const fn is_yuv(&self) -> bool
pub const fn is_yuv(&self) -> bool
Whether the colour is YCbCr, and so needs a matrix before it is RGB.
Sourcepub const fn plane_count(&self) -> usize
pub const fn plane_count(&self) -> usize
How many planes a buffer of this shape carries: one for packed and mono, two for semi-planar, three for planar.
Trait Implementations§
Source§impl Clone for SurfaceFormat
impl Clone for SurfaceFormat
Source§fn clone(&self) -> SurfaceFormat
fn clone(&self) -> SurfaceFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SurfaceFormat
Source§impl Debug for SurfaceFormat
impl Debug for SurfaceFormat
impl Eq for SurfaceFormat
Source§impl PartialEq for SurfaceFormat
impl PartialEq for SurfaceFormat
impl StructuralPartialEq for SurfaceFormat
Auto Trait Implementations§
impl Freeze for SurfaceFormat
impl RefUnwindSafe for SurfaceFormat
impl Send for SurfaceFormat
impl Sync for SurfaceFormat
impl Unpin for SurfaceFormat
impl UnsafeUnpin for SurfaceFormat
impl UnwindSafe for SurfaceFormat
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<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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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