#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include <algorithm>
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/animation/animation.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/vector2d_f.h"
#include "ui/views/animation/animation_builder.h"
#include "ui/views/animation/ink_drop_util.h"
#include "ui/views/style/platform_style.h"
namespace {
constexpr float kMinRadius = …;
gfx::Rect CalculateClipBounds(const gfx::Size& host_size,
const gfx::Insets& clip_insets) { … }
float CalculateCircleLayerRadius(const gfx::Rect& clip_bounds) { … }
}
namespace views {
FloodFillInkDropRipple::FloodFillInkDropRipple(InkDropHost* ink_drop_host,
const gfx::Size& host_size,
const gfx::Insets& clip_insets,
const gfx::Point& center_point,
SkColor color,
float visible_opacity)
: … { … }
FloodFillInkDropRipple::FloodFillInkDropRipple(InkDropHost* ink_drop_host,
const gfx::Size& host_size,
const gfx::Point& center_point,
SkColor color,
float visible_opacity)
: … { … }
FloodFillInkDropRipple::~FloodFillInkDropRipple() { … }
ui::Layer* FloodFillInkDropRipple::GetRootLayer() { … }
void FloodFillInkDropRipple::AnimateStateChange(
InkDropState old_ink_drop_state,
InkDropState new_ink_drop_state) { … }
void FloodFillInkDropRipple::SetStateToActivated() { … }
void FloodFillInkDropRipple::SetStateToHidden() { … }
void FloodFillInkDropRipple::AbortAllAnimations() { … }
void FloodFillInkDropRipple::SetOpacity(float opacity) { … }
gfx::Transform FloodFillInkDropRipple::CalculateTransform(
float target_radius) const { … }
gfx::Transform FloodFillInkDropRipple::GetMaxSizeTargetTransform() const { … }
float FloodFillInkDropRipple::MaxDistanceToCorners(
const gfx::Point& point) const { … }
base::TimeDelta FloodFillInkDropRipple::GetAnimationDuration(
AnimationSubState state) { … }
void FloodFillInkDropRipple::OnLayerAnimationSequenceScheduled(
ui::LayerAnimationSequence* sequence) { … }
}