chromium/cc/test/animation_test_common.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/test/animation_test_common.h"

#include <algorithm>
#include <memory>
#include <utility>

#include "base/memory/ptr_util.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/element_animations.h"
#include "cc/animation/keyframe_effect.h"
#include "cc/animation/scroll_offset_animation_curve.h"
#include "cc/animation/scroll_offset_animation_curve_factory.h"
#include "cc/layers/layer.h"
#include "cc/layers/layer_impl.h"
#include "ui/gfx/animation/keyframe/keyframed_animation_curve.h"
#include "ui/gfx/animation/keyframe/timing_function.h"

KeyframeModel;

namespace cc {

int AddOpacityTransition(Animation* target,
                         double duration,
                         float start_opacity,
                         float end_opacity,
                         bool use_timing_function,
                         int id,
                         std::optional<int> group_id) {}

int AddAnimatedTransform(Animation* target,
                         double duration,
                         gfx::TransformOperations start_operations,
                         gfx::TransformOperations operations) {}

int AddAnimatedCustomProperty(Animation* target,
                              double duration,
                              int start_value,
                              int end_value) {}

int AddAnimatedTransform(Animation* target,
                         double duration,
                         int delta_x,
                         int delta_y) {}

int AddAnimatedFilter(Animation* target,
                      double duration,
                      float start_brightness,
                      float end_brightness) {}

int AddAnimatedBackdropFilter(Animation* target,
                              double duration,
                              float start_invert,
                              float end_invert) {}

FakeFloatAnimationCurve::FakeFloatAnimationCurve()
    :{}

FakeFloatAnimationCurve::FakeFloatAnimationCurve(double duration)
    :{}

FakeFloatAnimationCurve::~FakeFloatAnimationCurve() = default;

base::TimeDelta FakeFloatAnimationCurve::Duration() const {}

float FakeFloatAnimationCurve::GetValue(base::TimeDelta now) const {}

float FakeFloatAnimationCurve::GetTransformedValue(
    base::TimeDelta now,
    gfx::TimingFunction::LimitDirection limit_direction) const {}

std::unique_ptr<gfx::AnimationCurve> FakeFloatAnimationCurve::Clone() const {}

FakeTransformTransition::FakeTransformTransition(double duration)
    :{}

FakeTransformTransition::~FakeTransformTransition() = default;

base::TimeDelta FakeTransformTransition::Duration() const {}

gfx::TransformOperations FakeTransformTransition::GetValue(
    base::TimeDelta time) const {}
gfx::TransformOperations FakeTransformTransition::GetTransformedValue(
    base::TimeDelta time,
    gfx::TimingFunction::LimitDirection limit_direction) const {}

bool FakeTransformTransition::PreservesAxisAlignment() const {}

bool FakeTransformTransition::MaximumScale(float* max_scale) const {}

std::unique_ptr<gfx::AnimationCurve> FakeTransformTransition::Clone() const {}

FakeFloatTransition::FakeFloatTransition(double duration, float from, float to)
    :{}

FakeFloatTransition::~FakeFloatTransition() = default;

base::TimeDelta FakeFloatTransition::Duration() const {}

float FakeFloatTransition::GetValue(base::TimeDelta time) const {}

float FakeFloatTransition::GetTransformedValue(
    base::TimeDelta time,
    gfx::TimingFunction::LimitDirection limit_direction) const {}

std::unique_ptr<gfx::AnimationCurve> FakeFloatTransition::Clone() const {}

int AddScrollOffsetAnimationToAnimation(Animation* animation,
                                        gfx::PointF initial_value,
                                        gfx::PointF target_value) {}

int AddAnimatedCustomPropertyToAnimation(Animation* animation,
                                         double duration,
                                         int start_value,
                                         int end_value) {}

int AddAnimatedTransformToAnimation(Animation* animation,
                                    double duration,
                                    int delta_x,
                                    int delta_y) {}

int AddAnimatedTransformToAnimation(Animation* animation,
                                    double duration,
                                    gfx::TransformOperations start_operations,
                                    gfx::TransformOperations operations) {}

int AddOpacityTransitionToAnimation(Animation* animation,
                                    double duration,
                                    float start_opacity,
                                    float end_opacity,
                                    bool use_timing_function,
                                    std::optional<int> id,
                                    std::optional<int> group_id) {}

int AddAnimatedFilterToAnimation(Animation* animation,
                                 double duration,
                                 float start_brightness,
                                 float end_brightness) {}

int AddAnimatedBackdropFilterToAnimation(Animation* animation,
                                         double duration,
                                         float start_invert,
                                         float end_invert) {}

int AddOpacityStepsToAnimation(Animation* animation,
                               double duration,
                               float start_opacity,
                               float end_opacity,
                               int num_steps) {}

void AddKeyframeModelToElementWithAnimation(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    std::unique_ptr<KeyframeModel> keyframe_model) {}

void AddKeyframeModelToElementWithExistingKeyframeEffect(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    std::unique_ptr<KeyframeModel> keyframe_model) {}

void RemoveKeyframeModelFromElementWithExistingKeyframeEffect(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    int keyframe_model_id) {}

KeyframeModel* GetKeyframeModelFromElementWithExistingKeyframeEffect(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    int keyframe_model_id) {}

int AddAnimatedFilterToElementWithAnimation(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    double duration,
    float start_brightness,
    float end_brightness) {}

int AddAnimatedTransformToElementWithAnimation(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    double duration,
    int delta_x,
    int delta_y) {}

int AddAnimatedTransformToElementWithAnimation(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    double duration,
    gfx::TransformOperations start_operations,
    gfx::TransformOperations operations) {}

int AddOpacityTransitionToElementWithAnimation(
    ElementId element_id,
    scoped_refptr<AnimationTimeline> timeline,
    double duration,
    float start_opacity,
    float end_opacity,
    bool use_timing_function) {}

scoped_refptr<Animation> CancelAndReplaceAnimation(Animation& animation) {}

}  // namespace cc