Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 8a603fae1c2a3f4b3ee3e65c311883c8f1091ad4..cef55fbbad8be43baab9cf2fae81079481de28a9 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -282,6 +282,7 @@ void LayerTreeHostImpl::BeginMainFrameAborted(CommitEarlyOutReason reason) { |
| if (CommitEarlyOutHandledCommit(reason)) { |
| active_tree_->ApplySentScrollAndScaleDeltasFromAbortedCommit(); |
| active_tree_->ResetContentsTexturesPurged(); |
| + RecordMainFrameTiming(); |
|
mithro-old
2015/03/20 02:17:54
The fact that this method is being called in two p
vmpstr
2015/03/20 18:47:26
Whether this is done in the scheduler or in lthi,
mithro-old
2015/03/23 00:15:08
If we aborted the commit, should we be generating
vmpstr
2015/03/23 20:26:43
This happens after apply scroll deltas, animate la
mithro-old
2015/03/24 07:37:42
Despite having worked in this area for a while, I'
|
| } |
| } |
| @@ -1865,6 +1866,7 @@ void LayerTreeHostImpl::ActivateSyncTree() { |
| pending_page_scale_animation->scale, |
| pending_page_scale_animation->duration); |
| } |
| + RecordMainFrameTiming(); |
| } |
| void LayerTreeHostImpl::SetVisible(bool visible) { |
| @@ -2106,6 +2108,24 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( |
| settings_.renderer_settings.refresh_rate)); |
| } |
| +void LayerTreeHostImpl::SetCurrentRequestAnimationFrameTime( |
| + base::TimeTicks frame_time) { |
| + request_animation_frame_time_ = frame_time; |
| +} |
| + |
| +void LayerTreeHostImpl::RecordMainFrameTiming() { |
| + std::vector<int64_t> request_ids; |
| + active_tree_->GatherFrameTimingRequestIds(&request_ids); |
| + if (request_ids.empty()) |
| + return; |
| + |
| + base::TimeTicks end_time = |
| + client_->GetNextPredictedRequestAnimationFrameTime(); |
| + frame_timing_tracker_->SaveMainFrameTimeStamps( |
| + request_ids, request_animation_frame_time_, end_time, |
| + active_tree_->source_frame_number()); |
| +} |
| + |
| void LayerTreeHostImpl::DestroyTileManager() { |
| tile_manager_ = nullptr; |
| resource_pool_ = nullptr; |