#include "cc/animation/worklet_animation.h"
#include <utility>
#include "cc/animation/animation_delegate.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/animation_timeline.h"
#include "cc/animation/keyframe_effect.h"
#include "cc/animation/scroll_timeline.h"
#include "cc/trees/animation_effect_timings.h"
#include "cc/trees/animation_options.h"
namespace cc {
WorkletAnimation::WorkletAnimation(
int cc_animation_id,
WorkletAnimationId worklet_animation_id,
const std::string& name,
double playback_rate_value,
std::unique_ptr<AnimationOptions> options,
std::unique_ptr<AnimationEffectTimings> effect_timings,
bool is_controlling_instance)
: … { … }
WorkletAnimation::~WorkletAnimation() = default;
scoped_refptr<WorkletAnimation> WorkletAnimation::Create(
WorkletAnimationId worklet_animation_id,
const std::string& name,
double playback_rate_value,
std::unique_ptr<AnimationOptions> options,
std::unique_ptr<AnimationEffectTimings> effect_timings) { … }
scoped_refptr<Animation> WorkletAnimation::CreateImplInstance() const { … }
void WorkletAnimation::PushPropertiesTo(Animation* animation_impl) { … }
bool WorkletAnimation::Tick(base::TimeTicks monotonic_time) { … }
void WorkletAnimation::UpdateState(bool start_ready_animations,
AnimationEvents* events) { … }
void WorkletAnimation::TakeTimeUpdatedEvent(AnimationEvents* events) { … }
void WorkletAnimation::UpdateInputState(MutatorInputState* input_state,
base::TimeTicks monotonic_time,
const ScrollTree& scroll_tree,
bool is_active_tree) { … }
void WorkletAnimation::SetOutputState(
const MutatorOutputState::AnimationState& state) { … }
void WorkletAnimation::SetPlaybackRate(double rate) { … }
void WorkletAnimation::UpdatePlaybackRate(double rate) { … }
void WorkletAnimation::ReleasePendingTreeLock() { … }
std::optional<base::TimeDelta> WorkletAnimation::CurrentTime(
base::TimeTicks monotonic_time,
const ScrollTree& scroll_tree,
bool is_active_tree) { … }
bool WorkletAnimation::NeedsUpdate(base::TimeTicks monotonic_time,
const ScrollTree& scroll_tree,
bool is_active_tree) { … }
bool WorkletAnimation::IsTimelineActive(const ScrollTree& scroll_tree,
bool is_active_tree) const { … }
void WorkletAnimation::RemoveKeyframeModel(int keyframe_model_id) { … }
bool WorkletAnimation::IsWorkletAnimation() const { … }
}