| Index: ui/compositor/layer_animation_element.h
|
| diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h
|
| index f847e42b8d3ba4816774d0d0f961fc12259aca50..664468e3bc17ca08f1d10947cb135c13f4bf6f4c 100644
|
| --- a/ui/compositor/layer_animation_element.h
|
| +++ b/ui/compositor/layer_animation_element.h
|
| @@ -25,6 +25,12 @@ namespace ui {
|
| class InterpolatedTransform;
|
| class LayerAnimationDelegate;
|
|
|
| +class AnimationMetricsReporter {
|
| + public:
|
| + virtual ~AnimationMetricsReporter() {}
|
| + virtual void Report(int value) = 0;
|
| +};
|
| +
|
| // LayerAnimationElements represent one segment of an animation between two
|
| // keyframes. They know how to update a LayerAnimationDelegate given a value
|
| // between 0 and 1 (0 for initial, and 1 for final).
|
| @@ -182,6 +188,10 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
|
| gfx::Tween::Type tween_type() const { return tween_type_; }
|
| void set_tween_type(gfx::Tween::Type tween_type) { tween_type_ = tween_type; }
|
|
|
| + void set_animation_metrics_reporter(AnimationMetricsReporter* reporter) {
|
| + animation_metrics_reporter_ = reporter;
|
| + }
|
| +
|
| // Each LayerAnimationElement has a unique animation_id. Elements belonging
|
| // to sequences that are supposed to start together have the same
|
| // animation_group_id.
|
| @@ -228,6 +238,11 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
|
|
|
| double last_progressed_fraction_;
|
|
|
| + // To obtain metrics of animation performance tag animation elements and
|
| + // keep track of sequential compositor frame number.
|
| + AnimationMetricsReporter* animation_metrics_reporter_;
|
| + int start_frame_number_;
|
| +
|
| base::WeakPtrFactory<LayerAnimationElement> weak_ptr_factory_;
|
|
|
| DISALLOW_ASSIGN(LayerAnimationElement);
|
|
|