Namespaces

Enumerations

enum class PixelFormat : uint32_t
Name Value Comments
BGRA_8 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.

YUY2 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

NV12 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.

YV12 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.

R8G8B8A8 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 17 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

enum class ColorSpace : uint32_t
Name Value
SRGB 0u

Specifies how pixel color information should be interpreted.

Defined at line 100 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

enum class Tiling : uint32_t
Name Value Comments
LINEAR 0u

Pixels are packed linearly.
Equivalent to `VK_IMAGE_TILING_LINEAR`.

GPU_OPTIMAL 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 112 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

enum class AlphaFormat : uint32_t
Name Value Comments
OPAQUE 0u

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

PREMULTIPLIED 1u

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

NON_PREMULTIPLIED 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 130 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

enum class Transform : uint32_t
Name Value Comments
NORMAL 0u

Pixels are displayed normally.

FLIP_HORIZONTAL 1u

Pixels are mirrored left-right.

FLIP_VERTICAL 2u

Pixels are flipped vertically.

FLIP_VERTICAL_AND_HORIZONTAL 3u

Pixels are flipped vertically and mirrored left-right.

Defined at line 151 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

enum class MemoryType : uint32_t
Name Value Comments
HOST_MEMORY 0u

VMO is regular host CPU memory.

VK_DEVICE_MEMORY 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 187 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

Records

Functions

  • zx_status_t Clone (::fuchsia::images::PixelFormat value, ::fuchsia::images::PixelFormat * result)

    Defined at line 93 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (::fuchsia::images::ColorSpace value, ::fuchsia::images::ColorSpace * result)

    Defined at line 105 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (::fuchsia::images::Tiling value, ::fuchsia::images::Tiling * result)

    Defined at line 123 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (::fuchsia::images::AlphaFormat value, ::fuchsia::images::AlphaFormat * result)

    Defined at line 145 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (::fuchsia::images::Transform value, ::fuchsia::images::Transform * result)

    Defined at line 166 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (::fuchsia::images::MemoryType value, ::fuchsia::images::MemoryType * result)

    Defined at line 197 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImageInfo & _value, ::fuchsia::images::ImageInfo * _result)

    Defined at line 309 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2AddBufferCollection2Request & _value, ::fuchsia::images::ImagePipe2AddBufferCollection2Request * _result)

    Defined at line 336 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2AddBufferCollectionRequest & _value, ::fuchsia::images::ImagePipe2AddBufferCollectionRequest * _result)

    Defined at line 359 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2AddImageRequest & _value, ::fuchsia::images::ImagePipe2AddImageRequest * _result)

    Defined at line 388 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2RemoveBufferCollectionRequest & _value, ::fuchsia::images::ImagePipe2RemoveBufferCollectionRequest * _result)

    Defined at line 409 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2RemoveImageRequest & _value, ::fuchsia::images::ImagePipe2RemoveImageRequest * _result)

    Defined at line 430 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2PresentImageRequest & _value, ::fuchsia::images::ImagePipe2PresentImageRequest * _result)

    Defined at line 459 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::PresentationInfo & _value, ::fuchsia::images::PresentationInfo * _result)

    Defined at line 500 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • zx_status_t Clone (const ::fuchsia::images::ImagePipe2PresentImageResponse & _value, ::fuchsia::images::ImagePipe2PresentImageResponse * _result)

    Defined at line 521 of file fidling/gen/sdk/fidl/fuchsia.images/fuchsia.images/hlcpp/fuchsia/images/cpp/fidl.h

  • std::ostream & operator<< (std::ostream & os, const AlphaFormat & value)
  • std::ostream & operator<< (std::ostream & os, const ColorSpace & value)
  • std::ostream & operator<< (std::ostream & os, const MemoryType & value)
  • std::ostream & operator<< (std::ostream & os, const PixelFormat & value)
  • std::ostream & operator<< (std::ostream & os, const Tiling & value)
  • std::ostream & operator<< (std::ostream & os, const Transform & value)
  • std::ostream & operator<< (std::ostream & os, const ImageInfo & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2AddBufferCollection2Request & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2AddBufferCollectionRequest & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2AddImageRequest & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2PresentImageRequest & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2PresentImageResponse & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2RemoveBufferCollectionRequest & value)
  • std::ostream & operator<< (std::ostream & os, const ImagePipe2RemoveImageRequest & value)
  • std::ostream & operator<< (std::ostream & os, const PresentationInfo & value)