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

Unified Diff: ash/rotator/screen_rotation_animator.h

Issue 2809553002: Fix corner case if another rotation request comes before the copy request finishes. (Closed)
Patch Set: Add TODO to handle cancel the copy request or ignore the copy result. 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 | ash/rotator/screen_rotation_animator.cc » ('j') | ash/rotator/screen_rotation_animator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator.h
diff --git a/ash/rotator/screen_rotation_animator.h b/ash/rotator/screen_rotation_animator.h
index 1852033b9e6b5c8aff54bd83d0a14275daf44adf..4c219222ab3a97226b8a5c7ee44c6b4da717131c 100644
--- a/ash/rotator/screen_rotation_animator.h
+++ b/ash/rotator/screen_rotation_animator.h
@@ -112,7 +112,17 @@ class ASH_EXPORT ScreenRotationAnimator {
// The id of the display to rotate.
int64_t display_id_;
- bool is_rotating_;
+
+ // For current slow rotation animation, there are two states |ROTATING| and
+ // |IDLE|. For the smooth rotation animation, we need to send copy request
+ // and get copy result before animating.
+ enum ScreenRotationState {
+ COPY_REQUESTED,
+ ROTATING,
+ IDLE,
+ };
+ ScreenRotationState screen_rotation_state_;
+
std::unique_ptr<ui::AnimationMetricsReporter> metrics_reporter_;
// Only set in unittest to disable animation timers.
bool disable_animation_timers_for_test_;
« no previous file with comments | « no previous file | ash/rotator/screen_rotation_animator.cc » ('j') | ash/rotator/screen_rotation_animator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698