chromium/ui/compositor/layer_animator.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 "ui/compositor/layer_animator.h"

#include <stddef.h>

#include <memory>
#include <vector>

#include "base/check_op.h"
#include "base/observer_list.h"
#include "base/trace_event/trace_event.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 "components/viz/common/frame_sinks/begin_frame_args.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_delegate.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/layer_animator_collection.h"

#define SAFE_INVOKE_VOID(function, running_anim, ...)
#define SAFE_INVOKE_BOOL(function, running_anim)
#define SAFE_INVOKE_PTR(function, running_anim)

namespace ui {

namespace {

const int kLayerAnimatorDefaultTransitionDurationMs =;

}  // namespace

// LayerAnimator public --------------------------------------------------------

LayerAnimator::LayerAnimator(base::TimeDelta transition_duration)
    :{}

LayerAnimator::~LayerAnimator() {}

// static
scoped_refptr<LayerAnimator> LayerAnimator::CreateDefaultAnimator() {}

// static
scoped_refptr<LayerAnimator> LayerAnimator::CreateImplicitAnimator() {}

// This macro provides the implementation for the setter and getter (well,
// the getter of the target value) for an animated property. For example,
// it is used for the implementations of SetTransform and GetTargetTransform.
// It is worth noting that SetFoo avoids invoking the usual animation machinery
// if the transition duration is zero -- in this case we just set the property
// on the layer animation delegate immediately.
#define ANIMATED_PROPERTY

ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY
ANIMATED_PROPERTY

#undef ANIMATED_PROPERTY

base::TimeDelta LayerAnimator::GetTransitionDuration() const {}

void LayerAnimator::SetDelegate(LayerAnimationDelegate* delegate) {}

void LayerAnimator::SwitchToLayer(scoped_refptr<cc::Layer> new_layer) {}

void LayerAnimator::AttachLayerAndTimeline(Compositor* compositor) {}

void LayerAnimator::DetachLayerAndTimeline(Compositor* compositor) {}

void LayerAnimator::AttachLayerToAnimation(int layer_id) {}

void LayerAnimator::DetachLayerFromAnimation() {}

void LayerAnimator::AddThreadedAnimation(
    std::unique_ptr<cc::KeyframeModel> animation) {}

void LayerAnimator::RemoveThreadedAnimation(int keyframe_model_id) {}

cc::Animation* LayerAnimator::GetAnimationForTesting() const {}

void LayerAnimator::StartAnimation(LayerAnimationSequence* animation) {}

void LayerAnimator::ScheduleAnimation(LayerAnimationSequence* animation) {}

void LayerAnimator::StartTogether(
    const std::vector<LayerAnimationSequence*>& animations) {}


void LayerAnimator::ScheduleTogether(
    const std::vector<LayerAnimationSequence*>& animations) {}

void LayerAnimator::SchedulePauseForProperties(
    base::TimeDelta duration,
    LayerAnimationElement::AnimatableProperties properties_to_pause) {}

bool LayerAnimator::IsAnimatingOnePropertyOf(
    LayerAnimationElement::AnimatableProperties properties) const {}

void LayerAnimator::StopAnimatingProperty(
    LayerAnimationElement::AnimatableProperty property) {}

void LayerAnimator::AddObserver(LayerAnimationObserver* observer) {}

void LayerAnimator::RemoveObserver(LayerAnimationObserver* observer) {}

void LayerAnimator::AddOwnedObserver(
    std::unique_ptr<ImplicitAnimationObserver> animation_observer) {}

void LayerAnimator::RemoveAndDestroyOwnedObserver(
    ImplicitAnimationObserver* animation_observer) {}

base::CallbackListSubscription LayerAnimator::AddSequenceScheduledCallback(
    SequenceScheduledCallback callback) {}

void LayerAnimator::OnThreadedAnimationStarted(
    base::TimeTicks monotonic_time,
    cc::TargetProperty::Type target_property,
    int group_id) {}

void LayerAnimator::AddToCollection(LayerAnimatorCollection* collection) {}

void LayerAnimator::RemoveFromCollection(LayerAnimatorCollection* collection) {}

// LayerAnimator protected -----------------------------------------------------

void LayerAnimator::ProgressAnimation(LayerAnimationSequence* sequence,
                                      base::TimeTicks now) {}

void LayerAnimator::ProgressAnimationToEnd(LayerAnimationSequence* sequence) {}

bool LayerAnimator::HasAnimation(LayerAnimationSequence* sequence) const {}

// LayerAnimator private -------------------------------------------------------

void LayerAnimator::Step(base::TimeTicks now) {}

void LayerAnimator::StopAnimatingInternal(bool abort) {}

void LayerAnimator::UpdateAnimationState() {}

LayerAnimationSequence* LayerAnimator::RemoveAnimation(
    LayerAnimationSequence* sequence) {}

void LayerAnimator::FinishAnimation(
    LayerAnimationSequence* sequence, bool abort) {}

void LayerAnimator::FinishAnyAnimationWithZeroDuration() {}

void LayerAnimator::ClearAnimations() {}

LayerAnimator::RunningAnimation* LayerAnimator::GetRunningAnimation(
    LayerAnimationElement::AnimatableProperty property) {}

void LayerAnimator::AddToQueueIfNotPresent(LayerAnimationSequence* animation) {}

void LayerAnimator::RemoveAllAnimationsWithACommonProperty(
    LayerAnimationSequence* sequence, bool abort) {}

void LayerAnimator::ImmediatelySetNewTarget(LayerAnimationSequence* sequence) {}

void LayerAnimator::ImmediatelyAnimateToNewTarget(
    LayerAnimationSequence* sequence) {}

void LayerAnimator::EnqueueNewAnimation(LayerAnimationSequence* sequence) {}

void LayerAnimator::ReplaceQueuedAnimations(LayerAnimationSequence* sequence) {}

void LayerAnimator::ProcessQueue() {}

bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) {}

void LayerAnimator::GetTargetValue(
    LayerAnimationElement::TargetValue* target) const {}

void LayerAnimator::OnScheduled(LayerAnimationSequence* sequence) {}

void LayerAnimator::SetTransitionDuration(base::TimeDelta duration) {}

void LayerAnimator::ClearAnimationsInternal() {}

void LayerAnimator::PurgeDeletedAnimations() {}

LayerAnimatorCollection* LayerAnimator::GetLayerAnimatorCollection() {}

void LayerAnimator::NotifyAnimationStarted(base::TimeTicks monotonic_time,
                                           int target_property,
                                           int group) {}

LayerAnimator::RunningAnimation::RunningAnimation(
    const base::WeakPtr<LayerAnimationSequence>& sequence)
    :{}

LayerAnimator::RunningAnimation::RunningAnimation(
    const RunningAnimation& other) = default;

LayerAnimator::RunningAnimation::~RunningAnimation() {}

}  // namespace ui