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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 914403003: cc: Add main frame timing info to frame timing tracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: 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 2c13fcbc861f58e298a6a9c073f3eca33c4574f4..33565f1730a0e0ee97041cf68acf307e914c58fc 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2101,6 +2101,20 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
settings_.renderer_settings.refresh_rate));
}
+void LayerTreeHostImpl::RecordMainFrameTiming(
+ const BeginFrameArgs& start_of_main_frame_args,
+ const BeginFrameArgs& expected_next_main_frame_args) {
+ std::vector<int64_t> request_ids;
+ active_tree_->GatherFrameTimingRequestIds(&request_ids);
+ if (request_ids.empty())
+ return;
+
+ base::TimeTicks start_time = start_of_main_frame_args.frame_time;
+ base::TimeTicks end_time = expected_next_main_frame_args.frame_time;
+ frame_timing_tracker_->SaveMainFrameTimeStamps(
+ request_ids, start_time, end_time, active_tree_->source_frame_number());
+}
+
void LayerTreeHostImpl::DestroyTileManager() {
tile_manager_ = nullptr;
resource_pool_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698