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

Unified Diff: ash/rotator/screen_rotation_animator.h

Issue 2771713004: Adds UMA for screen rotation animation smoothness. (Closed)
Patch Set: Merged and Moves the ScreenRotationAnimationMetricsReporter to .cc. Created 3 years, 9 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') | no next file with comments »
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 ac6f18a83569e0e1aeab745949ba9149bf5342fd..b541106e88030c68a5217cc03451e46268688eae 100644
--- a/ash/rotator/screen_rotation_animator.h
+++ b/ash/rotator/screen_rotation_animator.h
@@ -14,6 +14,7 @@
#include "ui/display/display.h"
namespace ui {
+class AnimationMetricsReporter;
class Layer;
class LayerTreeOwner;
} // namespace ui
@@ -49,9 +50,10 @@ class ASH_EXPORT ScreenRotationAnimator {
void RemoveScreenRotationAnimatorObserver(
ScreenRotationAnimatorObserver* observer);
- void OnLayerAnimationEnded();
-
- void OnLayerAnimationAborted();
+ // When screen rotation animation is ended or aborted, calls |Rotate()| with
+ // the pending rotation request if the request queue is not empty. Otherwise
+ // notifies |screen_rotation_animator_observer_|.
+ void ProcessAnimationQueue();
private:
friend class ash::test::ScreenRotationAnimatorTestApi;
@@ -64,11 +66,6 @@ class ASH_EXPORT ScreenRotationAnimator {
// |rotation_degrees| arc.
void AnimateRotation(std::unique_ptr<ScreenRotationRequest> rotation_request);
- // When screen rotation animation is ended or aborted, if the request queue is
- // not empty, it will call |Rotate()| with the pending rotation request.
- // Otherwise it will notify |screen_rotation_animator_observer_|.
- void ProcessAnimationQueue();
-
void set_disable_animation_timers_for_test(bool disable_timers);
void StopAnimating();
@@ -76,6 +73,7 @@ class ASH_EXPORT ScreenRotationAnimator {
// The id of the display to rotate.
int64_t display_id_;
bool is_rotating_;
+ std::unique_ptr<ui::AnimationMetricsReporter> metrics_reporter_;
// Only set in unittest to disable animation timers.
bool disable_animation_timers_for_test_;
base::ObserverList<ScreenRotationAnimatorObserver>
« no previous file with comments | « no previous file | ash/rotator/screen_rotation_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698