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

Unified Diff: cc/CCThreadProxy.cpp

Issue 10919227: Roll in CC changes up to 128196 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/CCSingleThreadProxy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCThreadProxy.cpp
diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp
index 1bbe5bc929e3103f7af9cb84ceef9fcdeb207060..0bd68ec4bde6290272e726f21f38cc5115d3607d 100644
--- a/cc/CCThreadProxy.cpp
+++ b/cc/CCThreadProxy.cpp
@@ -529,7 +529,7 @@ void CCThreadProxy::beginFrame()
}
if (request->contentsTexturesWereDeleted)
- m_layerTreeHost->evictAllContentTextures();
+ m_layerTreeHost->unlinkAllContentTextures();
OwnPtr<CCTextureUpdateQueue> queue = adoptPtr(new CCTextureUpdateQueue);
m_layerTreeHost->updateLayers(*(queue.get()), request->memoryAllocationLimitBytes);
@@ -571,7 +571,7 @@ void CCThreadProxy::beginFrameCompleteOnImplThread(CCCompletionEvent* completion
{
TRACE_EVENT0("cc", "CCThreadProxy::beginFrameCompleteOnImplThread");
ASSERT(!m_commitCompletionEventOnImplThread);
- ASSERT(isImplThread());
+ ASSERT(isImplThread() && isMainThreadBlocked());
ASSERT(m_schedulerOnImplThread);
ASSERT(m_schedulerOnImplThread->commitPending());
@@ -581,15 +581,20 @@ void CCThreadProxy::beginFrameCompleteOnImplThread(CCCompletionEvent* completion
return;
}
- if (!contentsTexturesWereDeleted && m_layerTreeHostImpl->contentsTexturesPurged()) {
+ if (contentsTexturesWereDeleted) {
+ ASSERT(m_layerTreeHostImpl->contentsTexturesPurged());
+ // We unlinked all textures on the main thread, delete them now.
+ m_layerTreeHost->deleteUnlinkedTextures();
+ // Mark that we can start drawing again when this commit is complete.
+ m_resetContentsTexturesPurgedAfterCommitOnImplThread = true;
+ } else if (m_layerTreeHostImpl->contentsTexturesPurged()) {
// We purged the content textures on the impl thread between the time we
// posted the beginFrame task and now, meaning we have a bunch of
// uploads that are now invalid. Clear the uploads (they all go to
// content textures), and kick another commit to fill them again.
queue->clearUploads();
setNeedsCommitOnImplThread();
- } else
- m_resetContentsTexturesPurgedAfterCommitOnImplThread = true;
+ }
m_currentTextureUpdateControllerOnImplThread = CCTextureUpdateController::create(CCProxy::implThread(), queue, m_layerTreeHostImpl->resourceProvider(), m_layerTreeHostImpl->renderer()->textureCopier(), m_layerTreeHostImpl->renderer()->textureUploader());
m_commitCompletionEventOnImplThread = completion;
« no previous file with comments | « cc/CCSingleThreadProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698