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

Unified Diff: ash/rotator/screen_rotation_animator.cc

Issue 2809553002: Fix corner case if another rotation request comes before the copy request finishes. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator.cc
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc
index a6eaccf6b435d42de2a595ddadf1823a29408325..b3bacdf3bbeffa3bcc5d1355efee2669ca879eae 100644
--- a/ash/rotator/screen_rotation_animator.cc
+++ b/ash/rotator/screen_rotation_animator.cc
@@ -421,6 +421,11 @@ void ScreenRotationAnimator::set_disable_animation_timers_for_test(
}
void ScreenRotationAnimator::StopAnimating() {
+ // |old_layer_tree_owner_| could be nullptr if another rotation request comes
+ // before the copy request finishes. At this time there is no animation.
+ if (!old_layer_tree_owner_)
oshima 2017/04/10 18:38:46 what's the exact call sequence that reaches this c
wutao 2017/04/10 21:19:22 Add the enum state, please review. Current sequen
+ return;
+
aura::Window* root_window = GetRootWindow(display_id_);
for (ui::Layer* child_layer : root_window->layer()->children()) {
if (child_layer == old_layer_tree_owner_->root())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698