#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/gfx/display_color_spaces.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
namespace gfx {
namespace {
const ContentColorUsage kAllColorUsages[] = …;
gfx::BufferFormat DefaultBufferFormat() { … }
size_t GetIndex(ContentColorUsage color_usage, bool needs_alpha) { … }
}
DisplayColorSpaces::DisplayColorSpaces() { … }
DisplayColorSpaces::DisplayColorSpaces(const gfx::DisplayColorSpaces&) =
default;
DisplayColorSpaces& DisplayColorSpaces::operator=(
const gfx::DisplayColorSpaces&) = default;
DisplayColorSpaces::DisplayColorSpaces(const gfx::ColorSpace& c)
: … { … }
DisplayColorSpaces::DisplayColorSpaces(const ColorSpace& c, BufferFormat f)
: … { … }
void DisplayColorSpaces::SetOutputBufferFormats(
gfx::BufferFormat buffer_format_no_alpha,
gfx::BufferFormat buffer_format_needs_alpha) { … }
void DisplayColorSpaces::SetOutputColorSpaceAndBufferFormat(
ContentColorUsage color_usage,
bool needs_alpha,
const gfx::ColorSpace& color_space,
gfx::BufferFormat buffer_format) { … }
ColorSpace DisplayColorSpaces::GetOutputColorSpace(
ContentColorUsage color_usage,
bool needs_alpha) const { … }
BufferFormat DisplayColorSpaces::GetOutputBufferFormat(
ContentColorUsage color_usage,
bool needs_alpha) const { … }
gfx::ColorSpace DisplayColorSpaces::GetRasterColorSpace() const { … }
gfx::ColorSpace DisplayColorSpaces::GetCompositingColorSpace(
bool needs_alpha,
ContentColorUsage color_usage) const { … }
bool DisplayColorSpaces::SupportsHDR() const { … }
ColorSpace DisplayColorSpaces::GetScreenInfoColorSpace() const { … }
void DisplayColorSpaces::ToStrings(
std::vector<std::string>* out_names,
std::vector<gfx::ColorSpace>* out_color_spaces,
std::vector<gfx::BufferFormat>* out_buffer_formats) const { … }
bool DisplayColorSpaces::operator==(const DisplayColorSpaces& other) const { … }
bool DisplayColorSpaces::operator!=(const DisplayColorSpaces& other) const { … }
bool DisplayColorSpaces::EqualExceptForHdrHeadroom(
const DisplayColorSpaces& a,
const DisplayColorSpaces& b) { … }
}