Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Unified Diff: ui/views/animation/square_ink_drop_ripple.cc

Issue 2640053003: Add logging for |old_ink_drop_state| when ink drop DCHECKs fail. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/square_ink_drop_ripple.cc
diff --git a/ui/views/animation/square_ink_drop_ripple.cc b/ui/views/animation/square_ink_drop_ripple.cc
index 64def3348ec3f48bb8847b8f74bba7ef6088d172..6a635a5e8cf6a15a4e10b615ffe32e4b5eef5a30 100644
--- a/ui/views/animation/square_ink_drop_ripple.cc
+++ b/ui/views/animation/square_ink_drop_ripple.cc
@@ -280,7 +280,9 @@ void SquareInkDropRipple::AnimateStateChange(
}
break;
case InkDropState::ACTION_PENDING:
- DCHECK(old_ink_drop_state == InkDropState::HIDDEN);
+ DCHECK_EQ(InkDropState::HIDDEN, old_ink_drop_state)
+ << " old_ink_drop_state=" << ToString(old_ink_drop_state);
+ ;
AnimateToOpacity(visible_opacity_,
GetAnimationDuration(ACTION_PENDING_FADE_IN),
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
@@ -301,7 +303,8 @@ void SquareInkDropRipple::AnimateStateChange(
break;
case InkDropState::ACTION_TRIGGERED: {
DCHECK(old_ink_drop_state == InkDropState::HIDDEN ||
- old_ink_drop_state == InkDropState::ACTION_PENDING);
+ old_ink_drop_state == InkDropState::ACTION_PENDING)
+ << " old_ink_drop_state=" << ToString(old_ink_drop_state);
if (old_ink_drop_state == InkDropState::HIDDEN) {
AnimateStateChange(old_ink_drop_state, InkDropState::ACTION_PENDING,
animation_observer);
@@ -323,7 +326,8 @@ void SquareInkDropRipple::AnimateStateChange(
break;
}
case InkDropState::ALTERNATE_ACTION_PENDING:
- DCHECK(old_ink_drop_state == InkDropState::ACTION_PENDING);
+ DCHECK_EQ(InkDropState::ACTION_PENDING, old_ink_drop_state)
+ << " old_ink_drop_state=" << ToString(old_ink_drop_state);
AnimateToOpacity(visible_opacity_,
GetAnimationDuration(ALTERNATE_ACTION_PENDING),
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
@@ -339,7 +343,8 @@ void SquareInkDropRipple::AnimateStateChange(
gfx::Tween::EASE_IN, animation_observer);
break;
case InkDropState::ALTERNATE_ACTION_TRIGGERED: {
- DCHECK(old_ink_drop_state == InkDropState::ALTERNATE_ACTION_PENDING);
+ DCHECK_EQ(InkDropState::ALTERNATE_ACTION_PENDING, old_ink_drop_state)
+ << " old_ink_drop_state=" << ToString(old_ink_drop_state);
base::TimeDelta visible_duration =
GetAnimationDuration(ALTERNATE_ACTION_TRIGGERED_TRANSFORM) -
GetAnimationDuration(ALTERNATE_ACTION_TRIGGERED_FADE_OUT);

Powered by Google App Engine
This is Rietveld 408576698