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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12209022: cc: add rasterize time to continuous painting graph data in impl-side-painting (Closed) Base URL: http://git.chromium.org/chromium/src.git@raster
Patch Set: Fixed style Created 7 years, 10 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/layer_tree_host_impl.h ('k') | cc/paint_time_counter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 7d1d1bc8225c91dd41bc52e724f002cc24634783..e09233ddb8feeaf1323ba89df05d7f82971579fe 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -1023,6 +1023,12 @@ void LayerTreeHostImpl::activatePendingTree()
m_client->onHasPendingTreeStateChanged(pendingTree());
m_client->setNeedsRedrawOnImplThread();
m_client->renewTreePriority();
+
+ if (m_tileManager && m_debugState.continuousPainting) {
+ RenderingStats stats;
+ m_tileManager->GetRenderingStats(&stats);
+ m_paintTimeCounter->SaveRasterizeTime(stats.totalRasterizeTimeForNowBinsOnPendingTree, m_activeTree->source_frame_number());
+ }
}
void LayerTreeHostImpl::setVisible(bool visible)
@@ -1768,15 +1774,19 @@ skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
void LayerTreeHostImpl::setDebugState(const LayerTreeDebugState& debugState)
{
+ if (m_debugState.continuousPainting != debugState.continuousPainting)
+ m_paintTimeCounter->ClearHistory();
+
m_debugState = debugState;
if (m_tileManager)
m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats());
}
-void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
+void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime, int commitNumber)
{
- m_paintTimeCounter->SavePaintTime(totalPaintTime);
+ DCHECK(m_debugState.continuousPainting);
+ m_paintTimeCounter->SavePaintTime(totalPaintTime, commitNumber);
}
} // namespace cc
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/paint_time_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698