class FormatCostKey

Defined at line 13168 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.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 Methods

void FormatCostKey ()

Defined at line 13170 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

void FormatCostKey (const FormatCostKey & other)

Defined at line 13171 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

void FormatCostKey (FormatCostKey && other)

Defined at line 13173 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

bool IsEmpty ()

Returns whether no field is set.

bool HasUnknownData ()

Returns whether the table references unknown fields.

::fidl::WireTableBuilder< ::fuchsia_sysmem2::wire::FormatCostKey> Builder (::fidl::AnyArena & arena)

Return a builder that by defaults allocates of an arena.

::fidl::WireTableExternalBuilder< ::fuchsia_sysmem2::wire::FormatCostKey> ExternalBuilder (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::FormatCostKey>> frame)

Return a builder that relies on explicitly allocating |fidl::ObjectView|s.

::fuchsia_images2::wire::PixelFormat & pixel_format ()

The pixel_format and pixel_format_modifier are the format to which this

FormatCost entry applies.

Must be set.

bool has_pixel_format ()
::fuchsia_images2::wire::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.

bool has_pixel_format_modifier ()
::fuchsia_sysmem2::wire::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.

bool has_buffer_usage_bits ()
FormatCostKey & operator= (const FormatCostKey & other)

Defined at line 13172 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

FormatCostKey & operator= (FormatCostKey && other)

Defined at line 13174 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

FormatCostKey & set_pixel_format (::fuchsia_images2::wire::PixelFormat elem)
FormatCostKey & clear_pixel_format ()
FormatCostKey & set_pixel_format_modifier (::fidl::ObjectView< ::fuchsia_images2::wire::PixelFormatModifier> elem)
FormatCostKey & set_pixel_format_modifier (std::nullptr_t )
FormatCostKey & clear_pixel_format_modifier ()
FormatCostKey & set_buffer_usage_bits (::fidl::ObjectView< ::fuchsia_sysmem2::wire::BufferUsage> elem)
FormatCostKey & set_buffer_usage_bits (std::nullptr_t )
FormatCostKey & clear_buffer_usage_bits ()
void FormatCostKey (::fidl::AnyArena & allocator)
void FormatCostKey (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::FormatCostKey>> && frame)

This constructor allows a user controlled allocation (not using a Arena).

It should only be used when performance is key.

As soon as the frame is given to the table, it must not be used directly or for another table.

void Allocate (::fidl::AnyArena & allocator)
void Init (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_sysmem2::wire::FormatCostKey>> && frame_ptr)
void ~FormatCostKey ()

Defined at line 13176 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/cpp/fidl/fuchsia.sysmem2/cpp/wire_types.h

Friends

class WireTableBaseBuilder
class WireTableBaseBuilder