pub enum PixelFormatModifier {
Show 19 variants
DoNotCare,
Invalid,
Linear,
IntelI915XTiled,
IntelI915YTiled,
IntelI915YfTiled,
IntelI915YTiledCcs,
IntelI915YfTiledCcs,
ArmAfbc16X16,
ArmAfbc32X8,
ArmLinearTe,
ArmAfbc16X16Te,
ArmAfbc32X8Te,
ArmAfbc16X16YuvTiledHeader,
ArmAfbc16X16SplitBlockSparseYuv,
ArmAfbc16X16SplitBlockSparseYuvTe,
ArmAfbc16X16SplitBlockSparseYuvTiledHeader,
ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader,
GoogleGoldfishOptimal,
// some variants omitted
}
Expand description
The upper 8 bits are a vendor code. The lower 56 bits are vendor-defined.
The defined PixelFormatModifier
values are specific, complete, and valid
values (except for INVALID
and DO_NOT_CARE
which have their own
meanings).
Some other valid or potentially-valid pixel_format_modifier
values are not
defined as a PixelFormatModifier
value, typically because the value isn’t
used in practice (or potentially is newly used but not yet defined in
PixelFormatModifier
). It is permitted to specify such a value as a
PixelFormatModifier
value in a pixel_format_modifier
field, despite the
lack of corresponding defined PixelFormatModifier
value. If such a value
is used outside test code, please consider adding it as a defined value in
PixelFormatModifier
. All such values must conform to the upper 8 bits
vendor code (don’t define/use values outside the/an appropriate vendor
code).
The separately-defined FORMAT_MODIFIER_*
uint64 values are vendor-specific
bit field values, not complete valid values on their own. These uint64
values can be used to help create or interpret a PixelFormatModifier
value
in terms of vendor-specific bitfields.
When the pixel_format_modifier
is set to a supported value (excluding
DO_NOT_CARE
, INVALID
, LINEAR
), the arrangement of pixel data otherwise
specified by the pixel_format
field is “modified”, typically to allow for
some combination of tiling, compression (typically lossless, typically for
memory bandwidth reduction not framebuffer size reduction), transaction
elimination, dirt tracking, but typically not modifying the bit depth of the
pixel_format
. In some cases there’s a per-image or per-tile header
involved, or similar. The pixel_format
field often still needs to be set
to a valid supported value that works in combination with the
pixel_format_modifier
, and that pixel_format
value can also contribute
to the overall meaning of the ImageFormat
. In other words, the “modifier”
part of the name is more accurate than “override” would be.
Variants§
DoNotCare
Invalid
Linear
IntelI915XTiled
IntelI915YTiled
IntelI915YfTiled
IntelI915YTiledCcs
IntelI915YfTiledCcs
ArmAfbc16X16
ArmAfbc32X8
ArmLinearTe
ArmAfbc16X16Te
ArmAfbc32X8Te
ArmAfbc16X16YuvTiledHeader
ArmAfbc16X16SplitBlockSparseYuv
ArmAfbc16X16SplitBlockSparseYuvTe
ArmAfbc16X16SplitBlockSparseYuvTiledHeader
ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader
GoogleGoldfishOptimal
Implementations§
Source§impl PixelFormatModifier
impl PixelFormatModifier
pub fn from_primitive(prim: u64) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u64) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u64
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for PixelFormatModifier
impl Clone for PixelFormatModifier
Source§fn clone(&self) -> PixelFormatModifier
fn clone(&self) -> PixelFormatModifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PixelFormatModifier
impl Debug for PixelFormatModifier
Source§impl<D: ResourceDialect> Decode<PixelFormatModifier, D> for PixelFormatModifier
impl<D: ResourceDialect> Decode<PixelFormatModifier, D> for PixelFormatModifier
Source§impl<D: ResourceDialect> Encode<PixelFormatModifier, D> for PixelFormatModifier
impl<D: ResourceDialect> Encode<PixelFormatModifier, D> for PixelFormatModifier
Source§impl Hash for PixelFormatModifier
impl Hash for PixelFormatModifier
Source§impl Ord for PixelFormatModifier
impl Ord for PixelFormatModifier
Source§fn cmp(&self, other: &PixelFormatModifier) -> Ordering
fn cmp(&self, other: &PixelFormatModifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PixelFormatModifier
impl PartialEq for PixelFormatModifier
Source§impl PartialOrd for PixelFormatModifier
impl PartialOrd for PixelFormatModifier
Source§impl TypeMarker for PixelFormatModifier
impl TypeMarker for PixelFormatModifier
Source§type Owned = PixelFormatModifier
type Owned = PixelFormatModifier
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for PixelFormatModifier
impl ValueTypeMarker for PixelFormatModifier
Source§type Borrowed<'a> = PixelFormatModifier
type Borrowed<'a> = PixelFormatModifier
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for PixelFormatModifier
impl Eq for PixelFormatModifier
impl StructuralPartialEq for PixelFormatModifier
Auto Trait Implementations§
impl Freeze for PixelFormatModifier
impl RefUnwindSafe for PixelFormatModifier
impl Send for PixelFormatModifier
impl Sync for PixelFormatModifier
impl Unpin for PixelFormatModifier
impl UnwindSafe for PixelFormatModifier
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)