class UsagePixelFormatCost
Defined at line 28 of file ../../src/sysmem/server/usage_pixel_format_cost.h
This class effectively breaks ties in a platform-specific way among the list
of PixelFormat(s) that a set of participants are all able to support.
At first, the list of PixelFormat(s) that all participants are able to
support is likely to be a short list. But even if that list is only 2
entries long, we'll typically want to prefer a particular choice depending
on considerations like max throughput, power usage, efficiency
considerations, etc.
For now, the overrides are baked into sysmem based on the platform ID (AKA
PID), in usage_overrides_*.cpp.
Any override will take precedence over the default PixelFormat sort order.
Public Methods
void UsagePixelFormatCost (std::vector<fuchsia_sysmem2::FormatCostEntry> entries)
Defined at line 145 of file ../../src/sysmem/server/usage_pixel_format_cost.cc
int32_t Compare (const fuchsia_sysmem2::BufferCollectionConstraints & constraints, uint32_t image_format_constraints_index_a, uint32_t image_format_constraints_index_b)
Compare the cost of two pixel formats, returning -1 if the first format
is lower cost, 0 if they're equal cost or unknown, and 1 if the first
format is higher cost.
By passing in the BufferCollectionConstraints, the implementation can
consider other aspects of constraints in addition to the usage.
Defined at line 163 of file ../../src/sysmem/server/usage_pixel_format_cost.cc