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

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 (UMA name fix) 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
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 141e7dd18bad6b16bfc4f7ad73f66fa8c27c6fa5..e66a3c7c97fac6c3fc9fdd81097a13518da76154 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());
}
@@ -97,7 +98,10 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() {
std::unique_ptr<LayerAnimationElement> element = \
LayerAnimationElement::Create##name##Element(value, duration); \
element->set_tween_type(tween_type_); \
- StartAnimation(new LayerAnimationSequence(std::move(element))); \
+ LayerAnimationSequence* sequence = \
+ new LayerAnimationSequence(std::move(element)); \
+ sequence->SetAnimationMetricsReporter(animation_metrics_reporter_); \
+ StartAnimation(sequence); \
} \
\
member_type LayerAnimator::GetTarget##name() const { \

Powered by Google App Engine
This is Rietveld 408576698