Delete all invalidated resources with same key

Delete all invalidated resources with same key instead of deleting
just the first resource.

R=mtklein@google.com, kkinnunen@nvidia.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/106563002

git-svn-id: http://skia.googlecode.com/svn/trunk@13019 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 5cf3f82..5e8c2c2 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -312,8 +312,8 @@
         //
         // 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) {
+        GrResourceEntry* entry;
+        while ((entry= fCache.find(invalidated[i].key, GrTFindUnreffedFunctor()))) {
             this->deleteResource(entry);
         }
     }