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

Unified Diff: cc/layer_tree_host.cc

Issue 11079007: Fix issue incremental upload can evict textures being drawn (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve against The Great Renaming 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
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index d75a3d36b784a3d7ed2036180797409ff2073b01..a15713666c6f423c2103ca1cb098426c87a31e58 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -241,8 +241,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
@@ -254,6 +252,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)
@@ -435,42 +436,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);
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/prioritized_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698