#include "ui/views/animation/animation_sequence_block.h"
#include <map>
#include <memory>
#include <optional>
#include <utility>
#include "base/check.h"
#include "base/functional/callback.h"
#include "base/time/time.h"
#include "base/types/pass_key.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer_animation_element.h"
#include "ui/compositor/layer_owner.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/gfx/interpolated_transform.h"
#include "ui/views/animation/animation_builder.h"
#include "ui/views/animation/animation_key.h"
namespace views {
PassKey;
AnimationSequenceBlock::AnimationSequenceBlock(
base::PassKey<AnimationBuilder> builder_key,
AnimationBuilder* owner,
base::TimeDelta start,
bool repeating)
: … { … }
AnimationSequenceBlock::~AnimationSequenceBlock() { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetDuration(
base::TimeDelta duration) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetBounds(
ui::Layer* target,
const gfx::Rect& bounds,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetBounds(
ui::LayerOwner* target,
const gfx::Rect& bounds,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetBrightness(
ui::Layer* target,
float brightness,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetBrightness(
ui::LayerOwner* target,
float brightness,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetClipRect(
ui::Layer* target,
const gfx::Rect& clip_rect,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetClipRect(
ui::LayerOwner* target,
const gfx::Rect& clip_rect,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetColor(
ui::Layer* target,
SkColor color,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetColor(
ui::LayerOwner* target,
SkColor color,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetGrayscale(
ui::Layer* target,
float grayscale,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetGrayscale(
ui::LayerOwner* target,
float grayscale,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetOpacity(
ui::Layer* target,
float opacity,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetOpacity(
ui::LayerOwner* target,
float opacity,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetTransform(
ui::Layer* target,
gfx::Transform transform,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetTransform(
ui::LayerOwner* target,
gfx::Transform transform,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetRoundedCorners(
ui::Layer* target,
const gfx::RoundedCornersF& rounded_corners,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetRoundedCorners(
ui::LayerOwner* target,
const gfx::RoundedCornersF& rounded_corners,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetGradientMask(
ui::Layer* target,
const gfx::LinearGradient& gradient_mask,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetGradientMask(
ui::LayerOwner* target,
const gfx::LinearGradient& gradient_mask,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetVisibility(
ui::Layer* target,
bool visible,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetVisibility(
ui::LayerOwner* target,
bool visible,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetInterpolatedTransform(
ui::Layer* target,
std::unique_ptr<ui::InterpolatedTransform> interpolated_transform,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::SetInterpolatedTransform(
ui::LayerOwner* target,
std::unique_ptr<ui::InterpolatedTransform> interpolated_transform,
gfx::Tween::Type tween_type) { … }
AnimationSequenceBlock& AnimationSequenceBlock::At(
base::TimeDelta since_sequence_start) { … }
AnimationSequenceBlock& AnimationSequenceBlock::Offset(
base::TimeDelta since_last_block_start) { … }
AnimationSequenceBlock& AnimationSequenceBlock::Then() { … }
AnimationSequenceBlock::Element::Element(AnimationValue animation_value,
gfx::Tween::Type tween_type)
: … { … }
AnimationSequenceBlock::Element::~Element() = default;
AnimationSequenceBlock::Element::Element(Element&&) = default;
AnimationSequenceBlock::Element& AnimationSequenceBlock::Element::operator=(
Element&&) = default;
AnimationSequenceBlock& AnimationSequenceBlock::AddAnimation(AnimationKey key,
Element element) { … }
void AnimationSequenceBlock::TerminateBlock() { … }
}