class FormatCostKey

Defined at line 11009 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

Entries which have the same pixel_format, pixel_format_modifier, and

required_usage_bits as a previous entry will override that previous entry.

For matching purposes, an absent pixel_format_modifier matches LINEAR, and

an absent required_buffer_usage_bits matches all-0 usage bits.

Public Members

static const fidl_type_t * FidlType

Public Methods

bool IsEmpty ()

Returns whether no field is set.

void FormatCostKey ()
void FormatCostKey (FormatCostKey && other)
const ::fuchsia::images2::PixelFormat & pixel_format ()

The pixel_format and pixel_format_modifier are the format to which this

FormatCost entry applies.

Must be set.

Defined at line 11019 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_pixel_format ()

Defined at line 11023 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

::fuchsia::images2::PixelFormat * mutable_pixel_format ()

The pixel_format and pixel_format_modifier are the format to which this

FormatCost entry applies.

Must be set.

Defined at line 11031 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_pixel_format ()

Defined at line 11039 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

const ::fuchsia::images2::PixelFormatModifier & pixel_format_modifier ()

The pixel_format and pixel_format_modifier are the format to which this

FormatCost entry applies.

Un-set is equivalent to LINEAR.

Defined at line 11051 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_pixel_format_modifier ()

Defined at line 11055 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

::fuchsia::images2::PixelFormatModifier * mutable_pixel_format_modifier ()

The pixel_format and pixel_format_modifier are the format to which this

FormatCost entry applies.

Un-set is equivalent to LINEAR.

Defined at line 11063 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_pixel_format_modifier ()

Defined at line 11071 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

const ::fuchsia::sysmem2::BufferUsage & buffer_usage_bits ()

If set, this entry is only considered if the buffer collection has at

least these usage bits set.

The buffer collection has an aggregated BufferUsage which is the union

of per-participant BufferUsage bits. FormatCost entries with additional

set bits are ignored. Among the rest, the one with matching format and

the most usage bits set determines the cost of that format for that

buffer collection.

Then the lowest-cost format is chosen for that buffer collection among

the formats that are mutually suppored by all the participants of that

buffer collection.

The main intent of this field is to allow "waving off" a format that

works, but doesn't perform well, for a particular combination of usages.

In that case the cost can be set high when the problematic combination

of usage bits is set. The format will still be chosen if this format is

the only mutually-supported format among the participants of the buffer

collection.

Un-set is equivalent to zero usage bits set, meaning the entry applies

to the format unless another entry with more specific usage applies.

It can be reasonable in some cases for all entries to omit this field,

when/if format selection based on format cost alone, ignoring usage, is

sufficient.

Defined at line 11105 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

bool has_buffer_usage_bits ()

Defined at line 11109 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

::fuchsia::sysmem2::BufferUsage * mutable_buffer_usage_bits ()

If set, this entry is only considered if the buffer collection has at

least these usage bits set.

The buffer collection has an aggregated BufferUsage which is the union

of per-participant BufferUsage bits. FormatCost entries with additional

set bits are ignored. Among the rest, the one with matching format and

the most usage bits set determines the cost of that format for that

buffer collection.

Then the lowest-cost format is chosen for that buffer collection among

the formats that are mutually suppored by all the participants of that

buffer collection.

The main intent of this field is to allow "waving off" a format that

works, but doesn't perform well, for a particular combination of usages.

In that case the cost can be set high when the problematic combination

of usage bits is set. The format will still be chosen if this format is

the only mutually-supported format among the participants of the buffer

collection.

Un-set is equivalent to zero usage bits set, meaning the entry applies

to the format unless another entry with more specific usage applies.

It can be reasonable in some cases for all entries to omit this field,

when/if format selection based on format cost alone, ignoring usage, is

sufficient.

Defined at line 11139 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

void clear_buffer_usage_bits ()

Defined at line 11147 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h

FormatCostKey & set_pixel_format (::fuchsia::images2::PixelFormat _value)
FormatCostKey & set_pixel_format_modifier (::fuchsia::images2::PixelFormatModifier _value)
FormatCostKey & set_buffer_usage_bits (::fuchsia::sysmem2::BufferUsage _value)
void ~FormatCostKey ()
FormatCostKey & operator= (FormatCostKey && other)
::std::unique_ptr<FormatCostKey> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, FormatCostKey * _value, size_t _offset)
zx_status_t Clone (FormatCostKey * _result)