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

Unified Diff: cc/CCLayerTreeHost.cpp

Issue 11079007: Fix issue incremental upload can evict textures being drawn (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 2 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/CCLayerTreeHost.cpp
diff --git a/cc/CCLayerTreeHost.cpp b/cc/CCLayerTreeHost.cpp
index ebd227e155fb8c17a473887f8e943575956eb18f..a241096d060062c2a098babd1c3494d069653e86 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,9 @@ void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl)
{
ASSERT(CCProxy::isImplThread());
+ m_contentsTextureManager->updateBackingsInDrawingImplTree();
+ m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
+
hostImpl->setRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), hostImpl->detachLayerTree(), hostImpl));
if (m_rootLayer && m_hudLayer)
@@ -439,42 +440,6 @@ void CCLayerTreeHost::setVisible(bool visible)
m_proxy->setVisible(visible);
}
-void CCLayerTreeHost::reduceContentsTexturesMemoryOnImplThread(size_t limitBytes, CCResourceProvider* resourceProvider)
-{
- ASSERT(CCProxy::isImplThread());
- ASSERT(m_contentsTextureManager.get());
- m_contentsTextureManager->reduceMemoryOnImplThread(limitBytes, resourceProvider);
-}
-
-bool CCLayerTreeHost::evictedContentsTexturesBackingsExist() const
-{
- ASSERT(CCProxy::isImplThread());
- ASSERT(m_contentsTextureManager.get());
- return m_contentsTextureManager->evictedBackingsExist();
-}
-
-void CCLayerTreeHost::getEvictedContentTexturesBackings(CCPrioritizedTextureManager::BackingVector& evictedBackings)
-{
- ASSERT(CCProxy::isImplThread());
- evictedBackings.clear();
- if (m_rendererInitialized)
- m_contentsTextureManager->getEvictedBackings(evictedBackings);
-}
-
-void CCLayerTreeHost::unlinkEvictedContentTexturesBackings(const CCPrioritizedTextureManager::BackingVector& evictedBackings)
-{
- ASSERT(CCProxy::isMainThread());
- ASSERT(m_contentsTextureManager.get());
- m_contentsTextureManager->unlinkEvictedBackings(evictedBackings);
-}
-
-bool CCLayerTreeHost::deleteEvictedContentTexturesBackings()
-{
- ASSERT(CCProxy::isImplThread() && CCProxy::isMainThreadBlocked());
- ASSERT(m_contentsTextureManager.get());
- return m_contentsTextureManager->deleteEvictedBackings();
-}
-
void CCLayerTreeHost::startPageScaleAnimation(const IntSize& targetPosition, bool useAnchor, float scale, double durationSec)
{
m_proxy->startPageScaleAnimation(targetPosition, useAnchor, scale, durationSec);

Powered by Google App Engine
This is Rietveld 408576698