Chromium Code Reviews| Index: cc/layer_tree_host.cc |
| diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc |
| index 9ee1e4201c118f7560f89e57d6d8882ee475480d..3fcfad2aca1cc855693a71a861be4f5fc610820a 100644 |
| --- a/cc/layer_tree_host.cc |
| +++ b/cc/layer_tree_host.cc |
| @@ -254,6 +254,10 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) |
| { |
| DCHECK(m_proxy->isImplThread()); |
| + // If there are linked evicted backings, these backings' resources may be put into the |
| + // impl tree, so we can't draw yet. Determine this before clearing all evicted backings. |
| + bool newImplTreeHasNoEvictedResources = !m_contentsTextureManager->linkedEvictedBackingsExist(); |
|
enne (OOO)
2013/01/17 17:31:14
Could you explain why this code moved from ThreadP
reveman
2013/01/17 18:49:49
We need to call ResetContentsTexturesPurged() on t
enne (OOO)
2013/01/17 18:57:17
Ah, makes perfect sense. Thanks for the explanati
|
| + |
| m_contentsTextureManager->updateBackingsInDrawingImplTree(); |
| m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider()); |
| @@ -300,6 +304,11 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) |
| hostImpl->setDebugState(m_debugState); |
| hostImpl->savePaintTime(m_renderingStats.totalPaintTime); |
| + if (newImplTreeHasNoEvictedResources) { |
| + if (syncTree->ContentsTexturesPurged()) |
| + syncTree->ResetContentsTexturesPurged(); |
| + } |
| + |
| m_commitNumber++; |
| } |