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

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 e66a3906e17db7d3124377331a65b3a661aa3ad5..1a663725119f53f08da40c7391e6c4f5bd868ac5 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2103,6 +2103,25 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
settings_.renderer_settings.refresh_rate));
}
+void LayerTreeHostImpl::RecordMainFrameTiming(
+ const BeginFrameArgs& start_of_main_frame_args,
+ const BeginFrameArgs& current_frame_args) {
mithro-old 2015/03/23 00:15:08 This is "current_main_frame_args" or "current_impl
vmpstr 2015/03/23 20:26:43 That's where I'm a little bit hesitant. It's reall
mithro-old 2015/03/24 07:37:42 I think you need to be *explicitly* clear what is
vmpstr 2015/03/24 18:02:15 In the situation where main frames don't happen on
+ 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;
+ // Since we finished the work in the current frame, we should be sending the
+ // next frame's frame_time. However, at this stage we don't know what the next
+ // frame_time will be. We can estimate this value by adding interval to the
+ // current frame's frame_time.
mithro-old 2015/03/23 00:15:08 I really don't think we should be sending an estim
vmpstr 2015/03/23 20:26:43 Done. With the latest patch, this is not an estima
+ base::TimeTicks end_time =
+ current_frame_args.frame_time + current_frame_args.interval;
+ 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