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

Unified Diff: cc/CCPrioritizedTexture.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: 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
Index: cc/CCPrioritizedTexture.cpp
diff --git a/cc/CCPrioritizedTexture.cpp b/cc/CCPrioritizedTexture.cpp
index 270ceba292b5906d5fa4d939cc05dbb0180bd370..94e60392619f5f1e2c09d2aeea7dc34510f3c73d 100644
--- a/cc/CCPrioritizedTexture.cpp
+++ b/cc/CCPrioritizedTexture.cpp
@@ -126,12 +126,30 @@ CCPrioritizedTexture::Backing::Backing(unsigned id, IntSize size, GC3Denum forma
, m_priorityAtLastPriorityUpdate(CCPriorityCalculator::lowestPriority())
, m_ownerExistedAtLastPriorityUpdate(false)
, m_wasAbovePriorityCutoffAtLastPriorityUpdate(false)
+ , m_resourceHasBeenDeleted(false)
{
}
CCPrioritizedTexture::Backing::~Backing()
{
ASSERT(!m_owner);
+ ASSERT(m_resourceHasBeenDeleted);
+}
+
+void CCPrioritizedTexture::Backing::deleteResource(CCResourceProvider* resourceProvider)
jamesr 2012/09/19 18:56:37 could we at least in debug verify that the provide
ccameron 2012/09/19 20:52:02 Added.
+{
+ ASSERT(CCProxy::isImplThread());
+ ASSERT(!m_resourceHasBeenDeleted);
+
+ resourceProvider->deleteResource(id());
+ setId(0);
+ m_resourceHasBeenDeleted = true;
+}
+
+bool CCPrioritizedTexture::Backing::resourceHasBeenDeleted() const
+{
+ ASSERT(CCProxy::isImplThread());
+ return m_resourceHasBeenDeleted;
}
void CCPrioritizedTexture::Backing::updatePriority()

Powered by Google App Engine
This is Rietveld 408576698