#include "third_party/blink/renderer/core/paint/svg_mask_painter.h"
#include "base/containers/adapters.h"
#include "cc/paint/color_filter.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_masker.h"
#include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h"
#include "third_party/blink/renderer/core/layout/svg/svg_resources.h"
#include "third_party/blink/renderer/core/paint/background_image_geometry.h"
#include "third_party/blink/renderer/core/paint/object_paint_properties.h"
#include "third_party/blink/renderer/core/paint/paint_auto_dark_mode.h"
#include "third_party/blink/renderer/core/paint/svg_background_paint_context.h"
#include "third_party/blink/renderer/core/style/style_mask_source_image.h"
#include "third_party/blink/renderer/core/svg/svg_length_functions.h"
#include "third_party/blink/renderer/platform/graphics/graphics_context_state_saver.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_display_item.h"
#include "third_party/blink/renderer/platform/graphics/paint/drawing_recorder.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
#include "third_party/blink/renderer/platform/graphics/paint/scoped_paint_chunk_properties.h"
#include "third_party/blink/renderer/platform/graphics/scoped_image_rendering_settings.h"
#include "ui/gfx/geometry/rect_conversions.h"
namespace blink {
namespace {
AffineTransform MaskToContentTransform(const LayoutSVGResourceMasker& masker,
const gfx::RectF& reference_box,
float zoom) { … }
LayoutSVGResourceMasker* ResolveElementReference(
const StyleMaskSourceImage& mask_source,
const ImageResourceObserver& observer) { … }
class ScopedMaskLuminanceLayer { … };
const StyleMaskSourceImage* ToMaskSourceIfSVGMask(
const StyleImage& style_image) { … }
void PaintMaskLayer(const FillLayer& layer,
const LayoutObject& object,
const SVGBackgroundPaintContext& bg_paint_context,
GraphicsContext& context) { … }
}
void SVGMaskPainter::Paint(GraphicsContext& context,
const LayoutObject& layout_object,
const DisplayItemClient& display_item_client) { … }
void SVGMaskPainter::PaintSVGMaskLayer(GraphicsContext& context,
const StyleMaskSourceImage& mask_source,
const ImageResourceObserver& observer,
const gfx::RectF& reference_box,
const float zoom,
const SkBlendMode composite_op,
const bool apply_mask_type) { … }
bool SVGMaskPainter::MaskIsValid(const StyleMaskSourceImage& mask_source,
const ImageResourceObserver& observer) { … }
gfx::RectF SVGMaskPainter::ResourceBoundsForSVGChild(
const LayoutObject& object) { … }
}