#include "third_party/blink/renderer/core/paint/filter_effect_builder.h"
#include <algorithm>
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h"
#include "third_party/blink/renderer/core/style/filter_operations.h"
#include "third_party/blink/renderer/core/svg/graphics/filters/svg_filter_builder.h"
#include "third_party/blink/renderer/core/svg/svg_animated_length.h"
#include "third_party/blink/renderer/core/svg/svg_filter_element.h"
#include "third_party/blink/renderer/core/svg/svg_resource.h"
#include "third_party/blink/renderer/platform/geometry/length_functions.h"
#include "third_party/blink/renderer/platform/graphics/compositor_filter_operations.h"
#include "third_party/blink/renderer/platform/graphics/filters/fe_box_reflect.h"
#include "third_party/blink/renderer/platform/graphics/filters/fe_color_matrix.h"
#include "third_party/blink/renderer/platform/graphics/filters/fe_component_transfer.h"
#include "third_party/blink/renderer/platform/graphics/filters/fe_drop_shadow.h"
#include "third_party/blink/renderer/platform/graphics/filters/fe_gaussian_blur.h"
#include "third_party/blink/renderer/platform/graphics/filters/filter.h"
#include "third_party/blink/renderer/platform/graphics/filters/filter_effect.h"
#include "third_party/blink/renderer/platform/graphics/filters/paint_filter_builder.h"
#include "third_party/blink/renderer/platform/graphics/filters/source_graphic.h"
#include "third_party/blink/renderer/platform/graphics/interpolation_space.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
namespace blink {
namespace {
inline void EndMatrixRow(Vector<float>& matrix) { … }
inline void LastMatrixRow(Vector<float>& matrix) { … }
Vector<float> GrayscaleMatrix(double amount) { … }
Vector<float> SepiaMatrix(double amount) { … }
}
FilterEffectBuilder::FilterEffectBuilder(const gfx::RectF& reference_box,
std::optional<gfx::SizeF> viewport,
float zoom,
Color current_color,
mojom::blink::ColorScheme color_scheme,
const cc::PaintFlags* fill_flags,
const cc::PaintFlags* stroke_flags)
: … { … }
FilterEffect* FilterEffectBuilder::BuildFilterEffect(
const FilterOperations& operations,
bool input_tainted) const { … }
CompositorFilterOperations FilterEffectBuilder::BuildFilterOperations(
const FilterOperations& operations) const { … }
Filter* FilterEffectBuilder::BuildReferenceFilter(
const ReferenceFilterOperation& reference_operation,
FilterEffect* previous_effect,
SVGFilterGraphNodeMap* node_map) const { … }
}