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

Unified Diff: src/gpu/GrResourceCache.cpp

Issue 140053002: move SkMessageBus::Get out of header (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: obsolete Created 6 years, 11 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 | « src/core/SkMessageBus.h ('k') | tests/MessageBusTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/core/SkMessageBus.h ('k') | tests/MessageBusTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698