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

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: 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
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index d1e90409007a922b5268a96b5b7f4a61af1e3151..28a9e9b0ab38057d73f8ace98a1dead77b3b50ec 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -1063,8 +1063,10 @@ bool LayerTreeHostImpl::initializeRenderer(scoped_ptr<OutputSurface> outputSurfa
if (!resourceProvider)
return false;
- if (m_settings.implSidePainting)
- m_tileManager.reset(new TileManager(this, resourceProvider.get(), m_settings.numRasterThreads, m_settings.recordRenderingStats));
+ if (m_settings.implSidePainting) {
+ m_tileManager.reset(new TileManager(this, resourceProvider.get(), m_settings.numRasterThreads));
+ m_tileManager->SetRecordRenderingStats(m_settings.recordRenderingStats);
+ }
if (outputSurface->Capabilities().has_parent_compositor)
m_renderer = DelegatingRenderer::Create(this, outputSurface.get(), resourceProvider.get());
@@ -1714,9 +1716,26 @@ skia::RefPtr<SkPicture> LayerTreeHostImpl::capturePicture()
return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
}
+void LayerTreeHostImpl::setDebugState(const LayerTreeDebugState& debugState)
+{
nduca 2013/02/05 23:09:35 bool continousChanged = m_debugState.continuousPai
+ m_debugState = debugState;
+
+ if (m_tileManager)
+ m_tileManager->SetRecordRenderingStats(m_settings.recordRenderingStats || m_debugState.continuousPainting);
+}
+
void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
nduca 2013/02/05 23:09:35 in impl side painting && continuous painting mode,
{
- m_paintTimeCounter->SavePaintTime(totalPaintTime);
+ DCHECK(m_debugState.continuousPainting);
+ base::TimeDelta totalPaintAndRasterizeTime = totalPaintTime;
+
+ if (m_tileManager) {
+ RenderingStats stats;
+ m_tileManager->GetRenderingStats(&stats);
+ totalPaintAndRasterizeTime += stats.totalRasterizeTime;
nduca 2013/02/05 23:09:35 stats.totalRasterizeTimeForNowBinsOnPendingTree
+ }
+
+ m_paintTimeCounter->SavePaintTime(totalPaintAndRasterizeTime, m_fpsCounter->currentFrameNumber());
}
} // namespace cc
« cc/layer_tree_host.cc ('K') | « 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