Index: src/gpu/GrResourceCache2.cpp |
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp |
index 0b6944ee856306f8a3983a82b87b5ab823aa91e2..c325efd40d5b11ab0d3fbb19f2b78553c6d107a0 100644 |
--- a/src/gpu/GrResourceCache2.cpp |
+++ b/src/gpu/GrResourceCache2.cpp |
@@ -17,11 +17,13 @@ GrResourceCache2::~GrResourceCache2() { |
void GrResourceCache2::insertResource(GrGpuResource* resource) { |
SkASSERT(NULL != resource); |
SkASSERT(!resource->wasDestroyed()); |
+ SkASSERT(!this->isInCache(resource)); |
fResources.addToHead(resource); |
++fCount; |
} |
void GrResourceCache2::removeResource(GrGpuResource* resource) { |
+ SkASSERT(this->isInCache(resource)); |
fResources.remove(resource); |
--fCount; |
} |