| Index: ui/views/animation/square_ink_drop_animation.cc
|
| diff --git a/ui/views/animation/square_ink_drop_animation.cc b/ui/views/animation/square_ink_drop_animation.cc
|
| index feea8bc328226e2979ec12f105f7dcf2e6ecc798..5930ea94272e31d7323f36a54c114a344c3539ff 100644
|
| --- a/ui/views/animation/square_ink_drop_animation.cc
|
| +++ b/ui/views/animation/square_ink_drop_animation.cc
|
| @@ -31,9 +31,6 @@ const float kMinimumRectScale = 0.0001f;
|
| // were causing visual anomalies.
|
| const float kMinimumCircleScale = 0.001f;
|
|
|
| -// The ink drop color.
|
| -const SkColor kInkDropColor = SK_ColorBLACK;
|
| -
|
| // All the sub animations that are used to animate each of the InkDropStates.
|
| // These are used to get time durations with
|
| // GetAnimationDuration(InkDropSubAnimations). Note that in general a sub
|
| @@ -176,7 +173,8 @@ gfx::Transform CalculateRectTransform(const gfx::Point& drawn_center_point,
|
|
|
| namespace views {
|
|
|
| -SquareInkDropAnimation::SquareInkDropAnimation(const gfx::Size& large_size,
|
| +SquareInkDropAnimation::SquareInkDropAnimation(SkColor color,
|
| + const gfx::Size& large_size,
|
| int large_corner_radius,
|
| const gfx::Size& small_size,
|
| int small_corner_radius)
|
| @@ -185,10 +183,9 @@ SquareInkDropAnimation::SquareInkDropAnimation(const gfx::Size& large_size,
|
| small_size_(small_size),
|
| small_corner_radius_(small_corner_radius),
|
| circle_layer_delegate_(new CircleLayerDelegate(
|
| - kInkDropColor,
|
| + color,
|
| std::min(large_size_.width(), large_size_.height()) / 2)),
|
| - rect_layer_delegate_(
|
| - new RectangleLayerDelegate(kInkDropColor, large_size_)) {
|
| + rect_layer_delegate_(new RectangleLayerDelegate(color, large_size_)) {
|
| for (int i = 0; i < PAINTED_SHAPE_COUNT; ++i)
|
| AddPaintLayer(static_cast<PaintedShape>(i));
|
|
|
| @@ -201,6 +198,10 @@ SquareInkDropAnimation::~SquareInkDropAnimation() {
|
| set_destroying();
|
| }
|
|
|
| +SkColor SquareInkDropAnimation::GetColor() const {
|
| + return circle_layer_delegate_->color();
|
| +}
|
| +
|
| void SquareInkDropAnimation::AbortAllAnimations() {
|
| InkDropAnimation::AbortAllAnimations();
|
| for (int i = 0; i < PAINTED_SHAPE_COUNT; ++i)
|
|
|