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

Unified Diff: cc/CCTextureUpdateQueue.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.h ('k') | cc/CCThreadProxy.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCTextureUpdateQueue.cpp
diff --git a/cc/CCTextureUpdateQueue.cpp b/cc/CCTextureUpdateQueue.cpp
index 1619ab2c676effdf883dd11d25239bc2d27cf213..b5ebdf56b2ea2154a4822252c875e56cc5e860bd 100644
--- a/cc/CCTextureUpdateQueue.cpp
+++ b/cc/CCTextureUpdateQueue.cpp
@@ -33,10 +33,21 @@ void CCTextureUpdateQueue::appendCopy(TextureCopier::Parameters copy)
m_copyEntries.append(copy);
}
-void CCTextureUpdateQueue::clearUploads()
+void CCTextureUpdateQueue::clearUploadsToEvictedResources()
{
- m_fullEntries.clear();
- m_partialEntries.clear();
+ clearUploadsToEvictedResources(m_fullEntries);
+ clearUploadsToEvictedResources(m_partialEntries);
+}
+
+void CCTextureUpdateQueue::clearUploadsToEvictedResources(Deque<TextureUploader::Parameters>& entryQueue)
+{
+ Deque<TextureUploader::Parameters> temp;
+ entryQueue.swap(temp);
+ while (temp.size()) {
+ TextureUploader::Parameters upload = temp.takeFirst();
+ if (!upload.texture->backingResourceWasEvicted())
+ entryQueue.append(upload);
+ }
}
TextureUploader::Parameters CCTextureUpdateQueue::takeFirstFullUpload()
« no previous file with comments | « cc/CCTextureUpdateQueue.h ('k') | cc/CCThreadProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698