| Index: cc/animation/animation_host.cc
|
| diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
|
| index d61b510f8ea0fe82ca03a3361a7d494d35d69385..ff9af04edd97ad7b69b05833c0af0f2a0c0694d8 100644
|
| --- a/cc/animation/animation_host.cc
|
| +++ b/cc/animation/animation_host.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "base/metrics/histogram.h"
|
| #include "cc/animation/animation_delegate.h"
|
| #include "cc/animation/animation_id_provider.h"
|
| #include "cc/animation/animation_player.h"
|
| @@ -217,6 +218,18 @@ void AnimationHost::SetNeedsCommit() {
|
| layer_tree_mutators_client_->SetMutatorsNeedCommit();
|
| }
|
|
|
| +void AnimationHost::ReportAndClearStatsOnFrameEnd() {
|
| + if (is_impl_instance_)
|
| + LOCAL_HISTOGRAM_CUSTOM_COUNTS(
|
| + "Mutators.FindPlayerForLayerImplId",
|
| + find_player_for_layer_id_stats_.InMicroseconds(), 1, 1000, 10);
|
| + else
|
| + LOCAL_HISTOGRAM_CUSTOM_COUNTS(
|
| + "Mutators.FindPlayerForLayerId",
|
| + find_player_for_layer_id_stats_.InMicroseconds(), 1, 1000, 10);
|
| + find_player_for_layer_id_stats_ = base::TimeDelta();
|
| +}
|
| +
|
| void AnimationHost::PushPropertiesTo(AnimationHost* host_impl) {
|
| PushTimelinesToImplThread(host_impl);
|
| RemoveTimelinesFromImplThread(host_impl);
|
| @@ -260,7 +273,9 @@ void AnimationHost::PushPropertiesToImplThread(AnimationHost* host_impl) {
|
|
|
| AnimationPlayer* AnimationHost::GetPlayerForLayerId(int layer_id) const {
|
| DCHECK(layer_id);
|
| + base::TimeTicks start_time = base::TimeTicks::Now();
|
| auto iter = layer_to_player_map_.find(layer_id);
|
| + find_player_for_layer_id_stats_ += base::TimeTicks::Now() - start_time;
|
| return iter == layer_to_player_map_.end() ? nullptr : iter->second;
|
| }
|
|
|
|
|