class PixelFormat

Defined at line 29 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

Equivalent to the FIDL type [`fuchsia.images2/PixelFormat`].

See `::fuchsia_images2::wire::PixelFormat` for references.

Instances are guaranteed to represent values supported by the display stack.

This is a value type. Instances can be stored in containers. Copying, moving

and destruction are trivial.

Public Members

static PixelFormat kR8G8B8A8
static PixelFormat kB8G8R8A8
static PixelFormat kI420
static PixelFormat kNv12
static PixelFormat kYuy2
static PixelFormat kYv12
static PixelFormat kB8G8R8
static PixelFormat kR5G6B5
static PixelFormat kR3G3B2
static PixelFormat kL8
static PixelFormat kR8
static PixelFormat kA2R10G10B10
static PixelFormat kA2B10G10R10
static PixelFormat kP010
static PixelFormat kR8G8B8

Public Methods

void PixelFormat (const PixelFormat & )

Defined at line 38 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

void PixelFormat (PixelFormat && )

Defined at line 39 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

PixelFormat & operator= (const PixelFormat & )

Defined at line 40 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

PixelFormat & operator= (PixelFormat && )

Defined at line 41 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

void ~PixelFormat ()

Defined at line 42 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

bool IsSupported (fuchsia_images2::wire::PixelFormat fidl_pixel_format)

True iff `fidl_pixel_format` is convertible to a valid PixelFormat.

Defined at line 89 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

void PixelFormat (fuchsia_images2::wire::PixelFormat fidl_pixel_format)

`fidl_pixel_format` must be a format supported by the display stack.

Defined at line 114 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

fuchsia_images2::wire::PixelFormat ToFidl ()

Defined at line 125 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

uint32_t ValueForLogging ()

Raw numerical value of the equivalent FIDL value.

This is intended to be used for developer-facing output, such as logging

and Inspect. The values have the same stability guarantees as the

equivalent FIDL type.

Defined at line 127 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

std::string_view ToString ()

Returns a developer-facing string representation.

Defined at line 23 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.cc

int PlaneCount ()

The number of planes used by this format.

Defined at line 129 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

int EncodingSize ()

The number of bytes it takes to encode one pixel using this format.

At the moment, the return value is not defined for pixel formats that have

multiple planes.

Defined at line 160 of file ../../src/graphics/display/lib/api-types/cpp/pixel-format.h

Friends

bool PixelFormat (const PixelFormat & lhs, const PixelFormat & rhs)
bool PixelFormat (const PixelFormat & lhsconst PixelFormat & rhs)