#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/display/types/display_color_management.h"
#include "base/check.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include <cmath>
namespace display {
namespace {
float EvaluateLut(float x,
const std::vector<GammaRampRGBEntry>& lut,
size_t channel) { … }
}
GammaCurve::GammaCurve() = default;
GammaCurve::GammaCurve(const std::vector<GammaRampRGBEntry>& lut)
: … { … }
GammaCurve::GammaCurve(GammaCurve&& other)
: … { … }
GammaCurve::GammaCurve(const GammaCurve& other) { … }
GammaCurve::~GammaCurve() = default;
GammaCurve& GammaCurve::operator=(const GammaCurve& other) { … }
GammaCurve GammaCurve::MakeConcat(const GammaCurve& f, const GammaCurve& g) { … }
GammaCurve GammaCurve::MakeGamma(float gamma) { … }
GammaCurve GammaCurve::MakeScale(float red, float green, float blue) { … }
float GammaCurve::Evaluate(float x, size_t channel) const { … }
void GammaCurve::Evaluate(float x,
uint16_t& out_r,
uint16_t& out_g,
uint16_t& out_b) const { … }
void GammaCurve::Evaluate(float rgb[3]) const { … }
std::string GammaCurve::ToString() const { … }
std::string GammaCurve::ToActionString(const std::string& name) const { … }
}