Namespaces

Enumerations

enum class PixelFormat : uint32_t
Name Value Comments
kBgra8 0u

BGRA_8

A 32-bit four-component unsigned integer format.
Byte order: B, G, R, A (little-endian ARGB packed 32-bit word).
Equivalent to Skia `kBGRA_8888_SkColorType` color type.
Equivalent to Zircon `ARGB_8888` pixel format on little-endian arch.

kYuy2 1u

YUY2

4:2:2 (2x down-sampled UV horizontally; full res UV vertically)

A 32-bit component that contains information for 2 pixels:
Byte order: Y1, U, Y2, V
Unpacks to 2 RGB pixels, where RGB1 = func(Y1, U, V)
and RGB2 = func(Y2, U, V)
Equivalent to YUV422

kNv12 2u

NV12

4:2:0 (2x down-sampled UV in both directions)

Offset 0:
8 bit per pixel Y plane with bytes YYY.
Offset height * stride:
8 bit UV data interleaved bytes as UVUVUV.

Y plane has line stride >= width.

In this context, both width and height are required to be even.

The UV data is separated into "lines", with each "line" having same byte
width as a line of Y data, and same "line" stride as Y data's line stride.
The UV data has height / 2 "lines".

In converting to RGB, the UV data gets up-scaled by 2x in both directions
overall. This comment is intentionally silent on exactly how UV up-scaling
phase/filtering/signal processing works, as it's a complicated topic that
can vary by implementation, typically trading off speed and quality of the
up-scaling. See comments in relevant conversion code for approach taken
by any given convert path. The precise relative phase of the UV data is
not presently conveyed.

kYv12 3u

YV12

Like I420, except with V and U swapped.

4:2:0 (2x down-sampled UV in both directions)

Offset 0:
8 bit per pixel Y plane with bytes YYY.
Offset height * stride:
8 bit V data with uv_stride = stride / 2
Offset height * stride + uv_stride * height / 2:
8 bit U data with uv_stride = stride / 2

Y plane has line stride >= width.

Both width and height are required to be even.

kR8G8B8A8 4u

R8G8B8A8

A 32-bit four-component unsigned integer format.
Byte order: R, G, B, A (little-endian ABGR packed 32-bit word).
Equivalent to Skia `kRGBA_8888_SkColorType` color type.
Equivalent to Zircon `ABGR_8888` pixel format on little-endian arch.

This format can only be used with VK_DEVICE_MEMORY.

Specifies how pixels are represented in the image buffer.

Defined at line 19 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

enum class ColorSpace : uint32_t
Name Value
kSrgb 0u

Specifies how pixel color information should be interpreted.

Defined at line 112 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

enum class Tiling : uint32_t
Name Value Comments
kLinear 0u

Pixels are packed linearly.
Equivalent to `VK_IMAGE_TILING_LINEAR`.

kGpuOptimal 1u

Pixels are packed in a GPU-dependent optimal format.
Equivalent to `VK_IMAGE_TILING_OPTIMAL`.

Specifies how pixels are arranged in memory.

Defined at line 134 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

enum class AlphaFormat : uint32_t
Name Value Comments
kOpaque 0u

Image is considered to be opaque. Alpha channel is ignored.
Blend function is: src.RGB

kPremultiplied 1u

Color channels have been premultiplied by alpha.
Blend function is: src.RGB + (dest.RGB * (1 - src.A))

kNonPremultiplied 2u

Color channels have not been premultiplied by alpha.
Blend function is: (src.RGB * src.A) + (dest.RGB * (1 - src.A))

Specifies how alpha information should be interpreted.

Defined at line 162 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

enum class Transform : uint32_t
Name Value Comments
kNormal 0u

Pixels are displayed normally.

kFlipHorizontal 1u

Pixels are mirrored left-right.

kFlipVertical 2u

Pixels are flipped vertically.

kFlipVerticalAndHorizontal 3u

Pixels are flipped vertically and mirrored left-right.

Defined at line 193 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

enum class MemoryType : uint32_t
Name Value Comments
kHostMemory 0u

VMO is regular host CPU memory.

kVkDeviceMemory 1u

VMO can be imported as a VkDeviceMemory by calling VkAllocateMemory with a
VkImportMemoryFuchsiaHandleInfoKHR wrapped in a VkMemoryAllocateInfo.

Specifies the type of VMO's memory.

Defined at line 225 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/cpp/fidl/fuchsia.images/cpp/common_types.h

Records