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

Unified Diff: ui/compositor/layer_animator.cc

Issue 2631333002: [animations] Adds metrics for jank on selected layer animations (Closed)
Patch Set: Adds UMA reporting for ripples and overview mode (query refresh rate) 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 | « ui/compositor/layer_animator.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 141e7dd18bad6b16bfc4f7ad73f66fa8c27c6fa5..df00ff9646cba741829a14c759535b111287eb85 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -53,7 +53,8 @@ LayerAnimator::LayerAnimator(base::TimeDelta transition_duration)
tween_type_(gfx::Tween::LINEAR),
is_started_(false),
disable_timer_for_test_(false),
- adding_animations_(false) {
+ adding_animations_(false),
+ animation_metrics_reporter_(nullptr) {
animation_player_ =
cc::AnimationPlayer::Create(cc::AnimationIdProvider::NextPlayerId());
}
@@ -195,6 +196,8 @@ cc::AnimationPlayer* LayerAnimator::GetAnimationPlayerForTesting() const {
void LayerAnimator::StartAnimation(LayerAnimationSequence* animation) {
scoped_refptr<LayerAnimator> retain(this);
+ if (animation_metrics_reporter_)
+ animation->SetAnimationMetricsReporter(animation_metrics_reporter_);
OnScheduled(animation);
if (!StartSequenceImmediately(animation)) {
// Attempt to preempt a running animation.
« no previous file with comments | « ui/compositor/layer_animator.h ('k') | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698