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

Side by Side Diff: ui/compositor/layer_animator.h

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 unified diff | Download patch
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 double animation_start_time, 355 double animation_start_time,
356 std::unique_ptr<cc::AnimationCurve> curve) override {} 356 std::unique_ptr<cc::AnimationCurve> curve) override {}
357 357
358 // Implementation of LayerThreadedAnimationDelegate. 358 // Implementation of LayerThreadedAnimationDelegate.
359 void AddThreadedAnimation(std::unique_ptr<cc::Animation> animation) override; 359 void AddThreadedAnimation(std::unique_ptr<cc::Animation> animation) override;
360 void RemoveThreadedAnimation(int animation_id) override; 360 void RemoveThreadedAnimation(int animation_id) override;
361 361
362 void AttachLayerToAnimationPlayer(int layer_id); 362 void AttachLayerToAnimationPlayer(int layer_id);
363 void DetachLayerFromAnimationPlayer(); 363 void DetachLayerFromAnimationPlayer();
364 364
365 void set_animation_metrics_reporter(AnimationMetricsReporter* reporter) {
366 animation_metrics_reporter_ = reporter;
367 }
368
365 // This is the queue of animations to run. 369 // This is the queue of animations to run.
366 AnimationQueue animation_queue_; 370 AnimationQueue animation_queue_;
367 371
368 // The target of all layer animations. 372 // The target of all layer animations.
369 LayerAnimationDelegate* delegate_; 373 LayerAnimationDelegate* delegate_;
370 374
371 // Plays CC animations. 375 // Plays CC animations.
372 scoped_refptr<cc::AnimationPlayer> animation_player_; 376 scoped_refptr<cc::AnimationPlayer> animation_player_;
373 377
374 // The currently running animations. 378 // The currently running animations.
(...skipping 19 matching lines...) Expand all
394 bool is_started_; 398 bool is_started_;
395 399
396 // This prevents the animator from automatically stepping through animations 400 // This prevents the animator from automatically stepping through animations
397 // and allows for manual stepping. 401 // and allows for manual stepping.
398 bool disable_timer_for_test_; 402 bool disable_timer_for_test_;
399 403
400 // Prevents timer adjustments in case when we start multiple animations 404 // Prevents timer adjustments in case when we start multiple animations
401 // with preemption strategies that discard previous animations. 405 // with preemption strategies that discard previous animations.
402 bool adding_animations_; 406 bool adding_animations_;
403 407
408 // Helper to output UMA performance metrics.
409 AnimationMetricsReporter* animation_metrics_reporter_;
410
404 // Observers are notified when layer animations end, are scheduled or are 411 // Observers are notified when layer animations end, are scheduled or are
405 // aborted. 412 // aborted.
406 base::ObserverList<LayerAnimationObserver> observers_; 413 base::ObserverList<LayerAnimationObserver> observers_;
407 414
408 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); 415 DISALLOW_COPY_AND_ASSIGN(LayerAnimator);
409 }; 416 };
410 417
411 } // namespace ui 418 } // namespace ui
412 419
413 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ 420 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698