class FormatCostKey
Defined at line 10832 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.
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 ()
void FormatCostKey (FormatCostKey && other)
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)
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 10842 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_pixel_format ()
Defined at line 10846 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 10854 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_pixel_format ()
Defined at line 10862 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 10874 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_pixel_format_modifier ()
Defined at line 10878 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 10886 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_pixel_format_modifier ()
Defined at line 10894 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 10928 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
bool has_buffer_usage_bits ()
Defined at line 10932 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 10962 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h
void clear_buffer_usage_bits ()
Defined at line 10970 of file fidling/gen/sdk/fidl/fuchsia.sysmem2/fuchsia.sysmem2/hlcpp/fuchsia/sysmem2/cpp/fidl.h