#include "cc/animation/scroll_offset_animations_impl.h"
#include <utility>
#include "base/trace_event/trace_event.h"
#include "base/trace_event/traced_value.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/animation_timeline.h"
#include "cc/animation/element_animations.h"
#include "cc/animation/scroll_offset_animation_curve_factory.h"
#include "ui/gfx/animation/keyframe/timing_function.h"
namespace cc {
ScrollOffsetAnimationImpl::ScrollOffsetAnimationImpl(AnimationHost* host)
: … { … }
ScrollOffsetAnimationImpl::~ScrollOffsetAnimationImpl() { … }
void ScrollOffsetAnimationImpl::AutoScrollAnimationCreate(
ElementId element_id,
const gfx::PointF& target_offset,
const gfx::PointF& current_offset,
float autoscroll_velocity,
base::TimeDelta animation_start_offset) { … }
void ScrollOffsetAnimationImpl::MouseWheelScrollAnimationCreate(
ElementId element_id,
const gfx::PointF& target_offset,
const gfx::PointF& current_offset,
base::TimeDelta delayed_by,
base::TimeDelta animation_start_offset) { … }
void ScrollOffsetAnimationImpl::ScrollAnimationCreateInternal(
ElementId element_id,
std::unique_ptr<gfx::AnimationCurve> curve,
base::TimeDelta animation_start_offset) { … }
std::optional<gfx::PointF>
ScrollOffsetAnimationImpl::ScrollAnimationUpdateTarget(
const gfx::Vector2dF& scroll_delta,
const gfx::PointF& max_scroll_offset,
base::TimeTicks frame_monotonic_time,
base::TimeDelta delayed_by) { … }
void ScrollOffsetAnimationImpl::ScrollAnimationApplyAdjustment(
ElementId element_id,
const gfx::Vector2dF& adjustment) { … }
void ScrollOffsetAnimationImpl::ScrollAnimationAbort(bool needs_completion) { … }
void ScrollOffsetAnimationImpl::AnimatingElementRemovedByCommit() { … }
void ScrollOffsetAnimationImpl::NotifyAnimationFinished(
base::TimeTicks monotonic_time,
int target_property,
int group) { … }
bool ScrollOffsetAnimationImpl::IsAnimating() const { … }
bool ScrollOffsetAnimationImpl::IsAutoScrolling() const { … }
ElementId ScrollOffsetAnimationImpl::GetElementId() const { … }
void ScrollOffsetAnimationImpl::ReattachScrollOffsetAnimationIfNeeded(
ElementId element_id) { … }
ScrollOffsetAnimationsImpl::ScrollOffsetAnimationsImpl(
AnimationHost* animation_host)
: … { … }
ScrollOffsetAnimationsImpl::~ScrollOffsetAnimationsImpl() = default;
void ScrollOffsetAnimationsImpl::AutoScrollAnimationCreate(
ElementId element_id,
const gfx::PointF& target_offset,
const gfx::PointF& current_offset,
float autoscroll_velocity,
base::TimeDelta animation_start_offset) { … }
void ScrollOffsetAnimationsImpl::MouseWheelScrollAnimationCreate(
ElementId element_id,
const gfx::PointF& target_offset,
const gfx::PointF& current_offset,
base::TimeDelta delayed_by,
base::TimeDelta animation_start_offset) { … }
std::optional<gfx::PointF>
ScrollOffsetAnimationsImpl::ScrollAnimationUpdateTarget(
const gfx::Vector2dF& scroll_delta,
const gfx::PointF& max_scroll_offset,
base::TimeTicks frame_monotonic_time,
base::TimeDelta delayed_by) { … }
void ScrollOffsetAnimationsImpl::ScrollAnimationApplyAdjustment(
ElementId element_id,
const gfx::Vector2dF& adjustment) { … }
void ScrollOffsetAnimationsImpl::ScrollAnimationAbort(bool needs_completion) { … }
void ScrollOffsetAnimationsImpl::AnimatingElementRemovedByCommit() { … }
bool ScrollOffsetAnimationsImpl::IsAnimating() const { … }
bool ScrollOffsetAnimationsImpl::IsAutoScrolling() const { … }
ElementId ScrollOffsetAnimationsImpl::GetElementId() const { … }
}