#include "third_party/blink/renderer/modules/csspaint/nativepaint/clip_path_paint_definition.h"
#include "cc/paint/paint_recorder.h"
#include "third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.h"
#include "third_party/blink/renderer/core/animation/css/compositor_keyframe_double.h"
#include "third_party/blink/renderer/core/animation/element_animations.h"
#include "third_party/blink/renderer/core/animation/path_interpolation_functions.h"
#include "third_party/blink/renderer/core/css/basic_shape_functions.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
#include "third_party/blink/renderer/core/css/css_inherited_value.h"
#include "third_party/blink/renderer/core/css/css_initial_value.h"
#include "third_party/blink/renderer/core/css/css_revert_layer_value.h"
#include "third_party/blink/renderer/core/css/css_revert_value.h"
#include "third_party/blink/renderer/core/css/css_to_length_conversion_data.h"
#include "third_party/blink/renderer/core/css/css_unset_value.h"
#include "third_party/blink/renderer/core/css/css_value_list.h"
#include "third_party/blink/renderer/core/css/cssom/paint_worklet_deferred_image.h"
#include "third_party/blink/renderer/core/css/cssom/paint_worklet_input.h"
#include "third_party/blink/renderer/core/css/properties/longhands.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver_state.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h"
#include "third_party/blink/renderer/core/style/shape_clip_path_operation.h"
#include "ui/gfx/geometry/size_f.h"
namespace blink {
namespace {
struct AnimationProgress { … };
class ClipPathPaintWorkletInput : public PaintWorkletInput { … };
scoped_refptr<BasicShape> CreateBasicShape(
BasicShape::ShapeType type,
const InterpolableValue& interpolable_value,
const NonInterpolableValue& untyped_non_interpolable_value) { … }
bool CanExtractShapeOrPath(const CSSValue* computed_value) { … }
scoped_refptr<BasicShape> GetAnimatedShapeFromKeyframe(
const PropertySpecificKeyframe* frame,
const KeyframeEffectModelBase* model,
const Element* element) { … }
bool ValidateClipPathValue(const Element* element,
const CSSValue* value,
const InterpolableValue* interpolable_value) { … }
SkPath InterpolatePaths(const bool shapes_are_compatible,
const SkPath& from,
const SkPath& to,
const float progress) { … }
double GetLocalProgress(double global_progress,
double first_offset,
double next_offset) { … }
}
template <>
struct DowncastTraits<ClipPathPaintWorkletInput> { … };
Animation* ClipPathPaintDefinition::GetAnimationIfCompositable(
const Element* element) { … }
ClipPathPaintDefinition* ClipPathPaintDefinition::Create(
LocalFrame& local_root) { … }
ClipPathPaintDefinition::ClipPathPaintDefinition(LocalFrame& local_root)
: … { … }
PaintRecord ClipPathPaintDefinition::Paint(
const CompositorPaintWorkletInput* compositor_input,
const CompositorPaintWorkletJob::AnimatedPropertyValues&
animated_property_values) { … }
scoped_refptr<Image> ClipPathPaintDefinition::Paint(
float zoom,
const gfx::RectF& reference_box,
const gfx::SizeF& clip_area_size,
const Node& node,
int worklet_id) { … }
gfx::RectF ClipPathPaintDefinition::ClipAreaRect(
const Node& node,
const gfx::RectF& reference_box,
float zoom) { … }
void ClipPathPaintDefinition::Trace(Visitor* visitor) const { … }
}