#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/graphics/filters/fe_color_matrix.h"
#include "base/types/optional_util.h"
#include "cc/paint/color_filter.h"
#include "third_party/blink/renderer/platform/graphics/filters/paint_filter_builder.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/text_stream.h"
namespace blink {
static const unsigned kColorMatrixSize = …;
FEColorMatrix::FEColorMatrix(Filter* filter,
ColorMatrixType type,
Vector<float> values)
: … { … }
ColorMatrixType FEColorMatrix::GetType() const { … }
bool FEColorMatrix::SetType(ColorMatrixType type) { … }
const Vector<float>& FEColorMatrix::Values() const { … }
bool FEColorMatrix::SetValues(Vector<float> values) { … }
static void SaturateMatrix(float s, float matrix[kColorMatrixSize]) { … }
static void HueRotateMatrix(float hue, float matrix[kColorMatrixSize]) { … }
static void LuminanceToAlphaMatrix(float matrix[kColorMatrixSize]) { … }
static sk_sp<cc::ColorFilter> CreateColorFilter(ColorMatrixType type,
const Vector<float>& values) { … }
bool FEColorMatrix::AffectsTransparentPixels() const { … }
sk_sp<PaintFilter> FEColorMatrix::CreateImageFilter() { … }
static WTF::TextStream& operator<<(WTF::TextStream& ts,
const ColorMatrixType& type) { … }
static bool ValuesIsValidForType(ColorMatrixType type,
const Vector<float>& values) { … }
WTF::TextStream& FEColorMatrix::ExternalRepresentation(WTF::TextStream& ts,
int indent) const { … }
}