Index: src/gpu/GrResourceCache.cpp |
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp |
index 5cf3f82c7d780d1acc5ee53ca20d9f6140b1a7b4..1ba60e8a3013e83be991a3ee5a608de0c3398ed9 100644 |
--- a/src/gpu/GrResourceCache.cpp |
+++ b/src/gpu/GrResourceCache.cpp |
@@ -11,6 +11,7 @@ |
#include "GrResourceCache.h" |
#include "GrResource.h" |
+DECLARE_SKMESSAGEBUS_MESSAGE(GrResourceInvalidatedMessage); |
GrResourceKey::ResourceType GrResourceKey::GenerateResourceType() { |
static int32_t gNextType = 0; |
@@ -312,8 +313,7 @@ void GrResourceCache::purgeInvalidated() { |
// |
// This is complicated and confusing. May try this in the future. For |
// now, these resources are just LRU'd as if we never got the message. |
- GrResourceEntry* entry = fCache.find(invalidated[i].key, GrTFindUnreffedFunctor()); |
- if (entry) { |
+ while (GrResourceEntry* entry = fCache.find(invalidated[i].key, GrTFindUnreffedFunctor())) { |
this->deleteResource(entry); |
} |
} |