pub enum PixelFormat {
Show 19 variants
Invalid,
R8G8B8A8,
Bgra32,
I420,
M420,
Nv12,
Yuy2,
Mjpeg,
Yv12,
Bgr24,
Rgb565,
Rgb332,
Rgb2220,
L8,
R8,
R8G8,
A2R10G10B10,
A2B10G10R10,
DoNotCare,
}
Expand description
Pixel format definitions that bridge different versions of sysmem / images2 formats Fuchsia uses for display and GPU drivers’ internal image type representation.
NOTE: The color-components are interpreted in memory in little-endian byte-order. E.g., PixelFormat::Bgra32 as [u8; 4] would have components [blue, green, red, alpha].
Variants§
Invalid
Equivalent to fuchsia.sysmem.PixelFormatType.Invalid and fuchsia.images2.PixelFormat.Invalid.
R8G8B8A8
RGB only, 8 bits per each of R/G/B/A sample
Equivalent to fuchsia.sysmem.PixelFormatType.R8G8B8A8 and fuchsia.images2.PixelFormat.R8G8B8A8.
Bgra32
32bpp BGRA, 1 plane. RGB only, 8 bits per each of B/G/R/A sample.
Equivalent to fuchsia.sysmem.PixelFormatType.Bgra32 and fuchsia.images2.PixelFormat.Bgra32.
I420
YUV only, 8 bits per Y sample
Equivalent to fuchsia.sysmem.PixelFormatType.I420 and fuchsia.images2.PixelFormat.I420.
M420
YUV only, 8 bits per Y sample
Equivalent to fuchsia.sysmem.PixelFormatType.M420 and fuchsia.images2.PixelFormat.M420.
Nv12
YUV only, 8 bits per Y sample
Equivalent to fuchsia.sysmem.PixelFormatType.Nv12 and fuchsia.images2.PixelFormat.Nv12.
Yuy2
YUV only, 8 bits per Y sample
Equivalent to fuchsia.sysmem.PixelFormatType.Yuy2 and fuchsia.images2.PixelFormat.Yuy2.
Mjpeg
This value is reserved, and not currently used.
Equivalent to fuchsia.sysmem.PixelFormatType.Mjpeg and fuchsia.images2.PixelFormat.Mjpeg.
Yv12
YUV only, 8 bits per Y sample
Equivalent to fuchsia.sysmem.PixelFormatType.Yv12 and fuchsia.images2.PixelFormat.Yv12.
Bgr24
24bpp BGR, 1 plane. RGB only, 8 bits per each of B/G/R sample
Equivalent to fuchsia.sysmem.PixelFormatType.Bgr24 and fuchsia.images2.PixelFormat.Bgr24.
Rgb565
16bpp RGB, 1 plane. 5 bits (most significant) R, 6 bits G, 5 bits B
Equivalent to fuchsia.sysmem.PixelFormatType.Rgb565 and fuchsia.images2.PixelFormat.Rgb565.
Rgb332
8bpp RGB, 1 plane. 3 bits (most significant) R, 3 bits G, 2 bits B
Equivalent to fuchsia.sysmem.PixelFormatType.Rgb332 and fuchsia.images2.PixelFormat.Rgb332.
Rgb2220
8bpp RGB, 1 plane. 2 bits (most significant) R, 2 bits G, 2 bits B
Equivalent to fuchsia.sysmem.PixelFormatType.Rgb2220 and fuchsia.images2.PixelFormat.Rgb2220.
L8
8bpp, Luminance-only (red, green and blue have identical values.)
Equivalent to fuchsia.sysmem.PixelFormatType.L8 and fuchsia.images2.PixelFormat.L8.
R8
8bpp, Red-only (Green and Blue are to be interpreted as 0).
Equivalent to fuchsia.sysmem.PixelFormatType.R8 and fuchsia.images2.PixelFormat.R8.
R8G8
16bpp RG, 1 plane. 8 bits R, 8 bits G.
Equivalent to fuchsia.sysmem.PixelFormatType.R8G8 and fuchsia.images2.PixelFormat.R8G8.
A2R10G10B10
32bpp RGBA, 1 plane. 2 bits A, 10 bits R/G/B.
Equivalent to fuchsia.sysmem.PixelFormatType.A2R10G10B10 and fuchsia.images2.PixelFormat.A2R10G10B10.
A2B10G10R10
32bpp BGRA, 1 plane. 2 bits A, 10 bits R/G/B.
Equivalent to fuchsia.sysmem.PixelFormatType.A2B10G10R10 and fuchsia.images2.PixelFormat.A2B10G10R10.
DoNotCare
A client is explicitly indicating that the client does not care which pixel format is chosen / used.
Equivalent to fuchsia.sysmem.PixelFormatType.DoNotCare and fuchsia.images2.PixelFormat.DoNotCare.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Default for PixelFormat
impl Default for PixelFormat
Source§fn default() -> PixelFormat
fn default() -> PixelFormat
Source§impl Display for PixelFormat
impl Display for PixelFormat
Source§impl From<&PixelFormat> for PixelFormat
impl From<&PixelFormat> for PixelFormat
Source§fn from(src: &PixelFormat) -> Self
fn from(src: &PixelFormat) -> Self
Source§impl From<&PixelFormat> for PixelFormat
impl From<&PixelFormat> for PixelFormat
Source§fn from(src: &PixelFormat) -> Self
fn from(src: &PixelFormat) -> Self
Source§impl From<&PixelFormat> for PixelFormatType
impl From<&PixelFormat> for PixelFormatType
Source§fn from(src: &PixelFormat) -> Self
fn from(src: &PixelFormat) -> Self
Source§impl From<&PixelFormatType> for PixelFormat
impl From<&PixelFormatType> for PixelFormat
Source§fn from(src: &PixelFormatType) -> Self
fn from(src: &PixelFormatType) -> Self
Source§impl From<PixelFormat> for PixelFormat
impl From<PixelFormat> for PixelFormat
Source§fn from(src: PixelFormat) -> Self
fn from(src: PixelFormat) -> Self
Source§impl From<PixelFormat> for PixelFormat
impl From<PixelFormat> for PixelFormat
Source§fn from(src: PixelFormat) -> Self
fn from(src: PixelFormat) -> Self
Source§impl From<PixelFormat> for PixelFormatType
impl From<PixelFormat> for PixelFormatType
Source§fn from(src: PixelFormat) -> Self
fn from(src: PixelFormat) -> Self
Source§impl From<PixelFormatType> for PixelFormat
impl From<PixelFormatType> for PixelFormat
Source§fn from(src: PixelFormatType) -> Self
fn from(src: PixelFormatType) -> Self
Source§impl FromStr for PixelFormat
impl FromStr for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl Copy for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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
)