Chromium Code Reviews| Index: cc/layer_tree_host_impl.cc |
| diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc |
| index 06db701f3a9279b63d86d5ec7fdfe06c9e84883a..f6e812f93382734a48d6c95f619b442cd84865b9 100644 |
| --- a/cc/layer_tree_host_impl.cc |
| +++ b/cc/layer_tree_host_impl.cc |
| @@ -1019,6 +1019,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) |
| @@ -1760,15 +1766,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, const int& commitNumber) |
|
egraether
2013/02/13 20:28:07
Changed naming to commitNumber.
|
| { |
| - m_paintTimeCounter->SavePaintTime(totalPaintTime); |
| + DCHECK(m_debugState.continuousPainting); |
| + m_paintTimeCounter->SavePaintTime(totalPaintTime, commitNumber); |
| } |
| } // namespace cc |