#include "ui/compositor/layer_animation_element.h"
#include <utility>
#include "base/compiler_specific.h"
#include "base/strings/stringprintf.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/keyframe_model.h"
#include "ui/compositor/float_animation_curve_adapter.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_delegate.h"
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/transform_animation_curve_adapter.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/interpolated_transform.h"
namespace ui {
namespace {
class Pause : public LayerAnimationElement { … };
class InterpolatedTransformTransition : public LayerAnimationElement { … };
class BoundsTransition : public LayerAnimationElement { … };
class VisibilityTransition : public LayerAnimationElement { … };
class BrightnessTransition : public LayerAnimationElement { … };
class GrayscaleTransition : public LayerAnimationElement { … };
class ColorTransition : public LayerAnimationElement { … };
class ClipRectTransition : public LayerAnimationElement { … };
class RoundedCornersTransition : public LayerAnimationElement { … };
class GradientMaskTransition : public LayerAnimationElement { … };
class ThreadedLayerAnimationElement : public LayerAnimationElement { … };
class ThreadedOpacityTransition : public ThreadedLayerAnimationElement { … };
class ThreadedTransformTransition : public ThreadedLayerAnimationElement { … };
}
LayerAnimationElement::TargetValue::TargetValue()
: … { … }
LayerAnimationElement::TargetValue::TargetValue(
const LayerAnimationDelegate* delegate)
: … { … }
LayerAnimationElement::LayerAnimationElement(AnimatableProperties properties,
base::TimeDelta duration)
: … { … }
LayerAnimationElement::LayerAnimationElement(
const LayerAnimationElement& element)
: … { … }
LayerAnimationElement::~LayerAnimationElement() = default;
void LayerAnimationElement::Start(LayerAnimationDelegate* delegate,
int animation_group_id) { … }
bool LayerAnimationElement::Progress(base::TimeTicks now,
LayerAnimationDelegate* delegate) { … }
bool LayerAnimationElement::IsFinished(base::TimeTicks time,
base::TimeDelta* total_duration) { … }
bool LayerAnimationElement::ProgressToEnd(LayerAnimationDelegate* delegate) { … }
void LayerAnimationElement::GetTargetValue(TargetValue* target) const { … }
bool LayerAnimationElement::IsThreaded(LayerAnimationDelegate* delegate) const { … }
void LayerAnimationElement::Abort(LayerAnimationDelegate* delegate) { … }
void LayerAnimationElement::RequestEffectiveStart(
LayerAnimationDelegate* delegate) { … }
std::string LayerAnimationElement::ToString() const { … }
void LayerAnimationElement::UpdateKeyframeModelId() { … }
std::string LayerAnimationElement::DebugName() const { … }
LayerAnimationElement::AnimatableProperty
LayerAnimationElement::ToAnimatableProperty(cc::TargetProperty::Type property) { … }
std::string LayerAnimationElement::AnimatablePropertiesToString(
AnimatableProperties properties) { … }
base::TimeDelta LayerAnimationElement::GetEffectiveDuration(
const base::TimeDelta& duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateTransformElement(const gfx::Transform& transform,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateInterpolatedTransformElement(
std::unique_ptr<InterpolatedTransform> interpolated_transform,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateBoundsElement(const gfx::Rect& bounds,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateOpacityElement(float opacity,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateVisibilityElement(bool visibility,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateBrightnessElement(float brightness,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateGrayscaleElement(float grayscale,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreatePauseElement(AnimatableProperties properties,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateColorElement(SkColor color,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateClipRectElement(const gfx::Rect& clip_rect,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateRoundedCornersElement(
const gfx::RoundedCornersF& rounded_corners,
base::TimeDelta duration) { … }
std::unique_ptr<LayerAnimationElement>
LayerAnimationElement::CreateGradientMaskElement(
const gfx::LinearGradient& gradient_mask,
base::TimeDelta duration) { … }
}