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

Unified Diff: ui/views/animation/flood_fill_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
« no previous file with comments | « no previous file | ui/views/animation/square_ink_drop_ripple.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/flood_fill_ink_drop_ripple.cc
diff --git a/ui/views/animation/flood_fill_ink_drop_ripple.cc b/ui/views/animation/flood_fill_ink_drop_ripple.cc
index 5ed22814c1b497d876ddb939af4ca9d8f588e13c..e542679e98ed3ccb0b681adeef99315ab9a2e254 100644
--- a/ui/views/animation/flood_fill_ink_drop_ripple.cc
+++ b/ui/views/animation/flood_fill_ink_drop_ripple.cc
@@ -209,7 +209,8 @@ void FloodFillInkDropRipple::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);
msw 2017/01/18 23:37:08 q: won't DCHECK_EQ already print the actual value
bruthig 2017/01/18 23:53:17 You're right it will print the int values. e.g. "
AnimateToOpacity(visible_opacity_,
GetAnimationDuration(ACTION_PENDING_FADE_IN),
@@ -228,7 +229,8 @@ void FloodFillInkDropRipple::AnimateStateChange(
}
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);
msw 2017/01/18 23:37:08 (this one is ok, since it's not a DCHECK_EQ)
if (old_ink_drop_state == InkDropState::HIDDEN) {
AnimateStateChange(old_ink_drop_state, InkDropState::ACTION_PENDING,
animation_observer);
@@ -240,7 +242,8 @@ void FloodFillInkDropRipple::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,
@@ -252,7 +255,8 @@ void FloodFillInkDropRipple::AnimateStateChange(
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);
AnimateToOpacity(kHiddenOpacity, GetAnimationDuration(
ALTERNATE_ACTION_TRIGGERED_FADE_OUT),
ui::LayerAnimator::ENQUEUE_NEW_ANIMATION,
« no previous file with comments | « no previous file | ui/views/animation/square_ink_drop_ripple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698