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

Unified Diff: cc/single_thread_proxy.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/prioritized_texture_unittest.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/single_thread_proxy.cc
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
index 7f89cf5a75827741f568cb6ba1f4ffe7bd7b82b6..400fde8b5ff6cd33c9cc0f4165b42f4437f1453f 100644
--- a/cc/single_thread_proxy.cc
+++ b/cc/single_thread_proxy.cc
@@ -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(scoped_ptr
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());
« no previous file with comments | « cc/prioritized_texture_unittest.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698