| Index: cc/CCLayerTreeHost.cpp
|
| diff --git a/cc/CCLayerTreeHost.cpp b/cc/CCLayerTreeHost.cpp
|
| index ceeb5368e8eb0e95e9e90685ba6b36f33e4e4a9a..8b88e3b71c41e81dbff103c1a24ad76fa624f581 100644
|
| --- a/cc/CCLayerTreeHost.cpp
|
| +++ b/cc/CCLayerTreeHost.cpp
|
| @@ -245,8 +245,6 @@ void CCLayerTreeHost::beginCommitOnImplThread(CCLayerTreeHostImpl* hostImpl)
|
| {
|
| ASSERT(CCProxy::isImplThread());
|
| TRACE_EVENT0("cc", "CCLayerTreeHost::commitTo");
|
| -
|
| - m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
|
| }
|
|
|
| // This function commits the CCLayerTreeHost to an impl tree. When modifying
|
| @@ -258,6 +256,12 @@ void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl)
|
| {
|
| ASSERT(CCProxy::isImplThread());
|
|
|
| + // We are about to synchronize trees, so it's now safe to delete textures
|
| + // (that may be in use on the old impl tree). Also, before pushing, update
|
| + // backing priorities so we know which textures to push.
|
| + m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
|
| + m_contentsTextureManager->updateBackingsPriorities();
|
| +
|
| hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostImpl->detachLayerTree(), hostImpl));
|
|
|
| if (m_rootLayer && m_hudLayer)
|
|
|