#include "third_party/blink/renderer/core/animation/interpolable_color.h"
#include <cmath>
#include <memory>
#include "base/check_op.h"
#include "base/notreached.h"
#include "third_party/blink/renderer/core/animation/css_interpolation_type.h"
#include "third_party/blink/renderer/core/animation/interpolable_value.h"
#include "third_party/blink/renderer/core/layout/layout_theme.h"
namespace blink {
namespace {
std::tuple<double, double, double, double> AddPremultipliedColor(
double param0,
double param1,
double param2,
double alpha,
double fraction,
Color color,
Color::ColorSpace color_space) { … }
std::tuple<double, double, double> UnpremultiplyColor(double param0,
double param1,
double param2,
double alpha) { … }
}
InterpolableColor* InterpolableColor::Create(Color color) { … }
InterpolableColor* InterpolableColor::Create(ColorKeyword color_keyword) { … }
InterpolableColor* InterpolableColor::Create(
CSSValueID keyword,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) { … }
InterpolableColor::InterpolableColor(
InlinedInterpolableDouble param0,
InlinedInterpolableDouble param1,
InlinedInterpolableDouble param2,
InlinedInterpolableDouble alpha,
InlinedInterpolableDouble current_color,
InlinedInterpolableDouble webkit_active_link,
InlinedInterpolableDouble webkit_link,
InlinedInterpolableDouble quirk_inherit,
Color::ColorSpace color_space)
: … { … }
InterpolableColor* InterpolableColor::RawClone() const { … }
InterpolableColor* InterpolableColor::RawCloneAndZero() const { … }
Color InterpolableColor::GetColor() const { … }
void InterpolableColor::AssertCanInterpolateWith(
const InterpolableValue& other) const { … }
bool InterpolableColor::IsKeywordColor() const { … }
void InterpolableColor::ConvertToColorSpace(Color::ColorSpace color_space) { … }
void InterpolableColor::SetupColorInterpolationSpaces(InterpolableColor& to,
InterpolableColor& from) { … }
void InterpolableColor::Scale(double scale) { … }
void InterpolableColor::Add(const InterpolableValue& other) { … }
Color InterpolableColor::Resolve(const Color& current_color,
const Color& active_link_color,
const Color& link_color,
const Color& text_color,
mojom::blink::ColorScheme color_scheme) const { … }
void InterpolableColor::Interpolate(const InterpolableValue& to,
const double progress,
InterpolableValue& result) const { … }
void InterpolableColor::Composite(const BaseInterpolableColor& value,
double fraction) { … }
}