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

Unified Diff: cc/CCThreadProxy.cpp

Issue 10947017: Enable removing uploads to evicted textures from texture upload queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback 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/CCTextureUpdateQueue.cpp ('k') | cc/LayerTextureUpdater.h » ('j') | 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 86d6a04766a64078b570a3ea23566e82292d3ced..c36a561e66e0f069bafa6eccc10effebc1a69c40 100644
--- a/cc/CCThreadProxy.cpp
+++ b/cc/CCThreadProxy.cpp
@@ -357,8 +357,10 @@ void CCThreadProxy::releaseContentsTexturesOnImplThread()
m_layerTreeHost->reduceContentsTexturesMemoryOnImplThread(0, m_layerTreeHostImpl->resourceProvider());
// Make sure that we get a new commit before drawing again.
m_resetContentsTexturesPurgedAfterCommitOnImplThread = false;
- // The texture upload queue may reference textures that were just purged, so clear it.
- m_currentTextureUpdateControllerOnImplThread.clear();
+ // The texture upload queue may reference textures that were just purged, clear
+ // them from the queue.
+ if (m_currentTextureUpdateControllerOnImplThread.get() && m_layerTreeHost->evictedContentsTexturesBackingsExist())
+ m_currentTextureUpdateControllerOnImplThread->discardUploadsToEvictedResources();
}
void CCThreadProxy::setNeedsRedraw()
@@ -587,14 +589,16 @@ void CCThreadProxy::beginFrameCompleteOnImplThread(CCCompletionEvent* completion
return;
}
+ // Clear any uploads we were making to textures linked to evicted
+ // resources
+ if (m_layerTreeHost->evictedContentsTexturesBackingsExist())
+ queue->clearUploadsToEvictedResources();
+
// If we unlinked evicted textures on the main thread, delete them now.
if (m_layerTreeHost->deleteEvictedContentTexturesBackings()) {
-
// Deleting the evicted textures' backings resulted in some textures in the
- // layer tree being invalidated (unliked from their backings). The upload queue
- // may contain references to these textures, so clear the queue and kick off
+ // layer tree being invalidated (unliked from their backings). Kick off
// another commit to fill them again.
- queue->clearUploads();
setNeedsCommitOnImplThread();
} else {
// The layer tree does not reference evicted textures, so mark that we
« no previous file with comments | « cc/CCTextureUpdateQueue.cpp ('k') | cc/LayerTextureUpdater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698