Commit a64ddc44 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

desks: Add and convert some CHECK to debug continuous gestures.

Test: none
Bug: 1134390
Change-Id: I9d1333178f2b006fec25dcc69e30708df68e5b78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454373
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814451}
parent 3692e6bb
...@@ -145,7 +145,8 @@ bool DeskActivationAnimation::UpdateSwipeAnimation(float scroll_delta_x) { ...@@ -145,7 +145,8 @@ bool DeskActivationAnimation::UpdateSwipeAnimation(float scroll_delta_x) {
} }
// Activate the target desk and take a screenshot. // Activate the target desk and take a screenshot.
DCHECK_EQ(pending_animators.size(), desk_switch_animators_.size()); // TODO(crbug.com/1134390): Convert back to DCHECK when the issue is fixed.
CHECK_EQ(pending_animators.size(), desk_switch_animators_.size());
ending_desk_index_ = desk_switch_animators_[0]->ending_desk_index(); ending_desk_index_ = desk_switch_animators_[0]->ending_desk_index();
PrepareDeskForScreenshot(ending_desk_index_); PrepareDeskForScreenshot(ending_desk_index_);
for (auto* animator : pending_animators) for (auto* animator : pending_animators)
......
...@@ -320,6 +320,10 @@ bool RootWindowDeskSwitchAnimator::UpdateSwipeAnimation(float scroll_delta_x) { ...@@ -320,6 +320,10 @@ bool RootWindowDeskSwitchAnimator::UpdateSwipeAnimation(float scroll_delta_x) {
} }
void RootWindowDeskSwitchAnimator::EndSwipeAnimation() { void RootWindowDeskSwitchAnimator::EndSwipeAnimation() {
// TODO(crbug.com/1134390): Convert back to DCHECK when the issue is fixed.
CHECK(starting_desk_screenshot_taken_);
CHECK(ending_desk_screenshot_taken_);
ending_desk_index_ = GetIndexOfMostVisibleDeskScreenshot(); ending_desk_index_ = GetIndexOfMostVisibleDeskScreenshot();
StartAnimation(); StartAnimation();
} }
...@@ -577,8 +581,9 @@ int RootWindowDeskSwitchAnimator::GetIndexOfMostVisibleDeskScreenshot() const { ...@@ -577,8 +581,9 @@ int RootWindowDeskSwitchAnimator::GetIndexOfMostVisibleDeskScreenshot() const {
} }
} }
DCHECK_GE(index, 0); // TODO(crbug.com/1134390): Convert back to DCHECK when the issue is fixed.
DCHECK_LT(index, int{DesksController::Get()->desks().size()}); CHECK_GE(index, 0);
CHECK_LT(index, int{DesksController::Get()->desks().size()});
return index; return index;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment