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

Unified Diff: cc/CCSingleThreadProxy.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/CCSingleThreadProxy.cpp
diff --git a/cc/CCSingleThreadProxy.cpp b/cc/CCSingleThreadProxy.cpp
index 6e342a00be7d88da1a015ed02be0935544ee3bbc..0270f79ae8854d79f4990f61d546a05a918b57c0 100644
--- a/cc/CCSingleThreadProxy.cpp
+++ b/cc/CCSingleThreadProxy.cpp
@@ -189,6 +189,7 @@ void CCSingleThreadProxy::doCommit(PassOwnPtr<CCTextureUpdateQueue> queue)
base::TimeTicks startTime = base::TimeTicks::HighResNow();
m_layerTreeHostImpl->beginCommit();
+ m_layerTreeHost->contentsTextureManager()->pushTexturePrioritiesToBackings();
m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get());
OwnPtr<CCTextureUpdateController> updateController =
@@ -282,7 +283,8 @@ void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr
void CCSingleThreadProxy::releaseContentsTexturesOnImplThread()
{
ASSERT(isImplThread());
- m_layerTreeHost->reduceContentsTexturesMemoryOnImplThread(0, m_layerTreeHostImpl->resourceProvider());
+ if (m_layerTreeHost->contentsTextureManager())
+ m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(0, m_layerTreeHostImpl->resourceProvider());
}
// Called by the legacy scheduling path (e.g. where render_widget does the scheduling)
@@ -319,13 +321,9 @@ bool CCSingleThreadProxy::commitAndComposite()
CCPrioritizedTextureManager::BackingVector evictedContentsTexturesBackings;
{
DebugScopedSetImplThread implThread;
- m_layerTreeHost->getEvictedContentTexturesBackings(evictedContentsTexturesBackings);
- }
- m_layerTreeHost->unlinkEvictedContentTexturesBackings(evictedContentsTexturesBackings);
- {
- DebugScopedSetImplThreadAndMainThreadBlocked implAndMainBlocked;
- m_layerTreeHost->deleteEvictedContentTexturesBackings();
+ m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedContentsTexturesBackings);
}
+ m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedContentsTexturesBackings);
OwnPtr<CCTextureUpdateQueue> queue = adoptPtr(new CCTextureUpdateQueue);
m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAllocationLimitBytes());

Powered by Google App Engine
This is Rietveld 408576698