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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2946223003: cc: Add UMA to measure the raster duration for pending tree activation. (Closed)
Patch Set: tests Created 3 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67f5b43ffdcf902a5bc7130b96263076854c8dfc..6dbf6453753abff7f453354bb4b271ba428d23d4 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -161,6 +161,8 @@ void RecordCompositorSlowScrollMetric(InputHandler::ScrollInputType type,
DEFINE_SCOPED_UMA_HISTOGRAM_TIMER(PendingTreeDurationHistogramTimer,
"Scheduling.%s.PendingTreeDuration");
+DEFINE_SCOPED_UMA_HISTOGRAM_TIMER(PendingTreeRasterDurationHistogramTimer,
+ "Scheduling.%s.PendingTreeRasterDuration");
LayerTreeHostImpl::FrameData::FrameData()
: render_surface_list(nullptr),
@@ -387,6 +389,10 @@ void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() {
// Scheduler to wait for ReadyToDraw signal to avoid Checkerboard.
if (CommitToActiveTree())
NotifyReadyToDraw();
+ } else if (!CommitToActiveTree()) {
+ DCHECK(!pending_tree_raster_duration_timer_);
+ pending_tree_raster_duration_timer_ =
+ base::MakeUnique<PendingTreeRasterDurationHistogramTimer>();
}
}
@@ -1376,6 +1382,7 @@ void LayerTreeHostImpl::RequestImplSideInvalidation() {
}
void LayerTreeHostImpl::NotifyReadyToActivate() {
+ pending_tree_raster_duration_timer_.reset();
client_->NotifyReadyToActivate();
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698