Move GrTMultiMap to src/core and rename it
authorrobertphillips <robertphillips@google.com>
Mon, 21 Jul 2014 19:40:57 +0000 (12:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 21 Jul 2014 19:40:57 +0000 (12:40 -0700)
R=bsalomon@google.com

Author: robertphillips@google.com

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

src/core/SkTMultiMap.h [moved from src/gpu/GrTMultiMap.h with 95% similarity]
src/gpu/GrResourceCache.h

similarity index 95%
rename from src/gpu/GrTMultiMap.h
rename to src/core/SkTMultiMap.h
index 0007a04..c0b59ba 100644 (file)
@@ -6,8 +6,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrTMultiMap_DEFINED
-#define GrTMultiMap_DEFINED
+#ifndef SkTMultiMap_DEFINED
+#define SkTMultiMap_DEFINED
 
 #include "GrTypes.h"
 #include "SkTDynamicHash.h"
@@ -18,7 +18,7 @@
 template <typename T,
           typename Key,
           typename HashTraits=T>
-class GrTMultiMap {
+class SkTMultiMap {
     struct ValueList {
         explicit ValueList(T* value) : fValue(value), fNext(NULL) {}
 
@@ -28,9 +28,9 @@ class GrTMultiMap {
         ValueList* fNext;
     };
 public:
-    GrTMultiMap() : fCount(0) {}
+    SkTMultiMap() : fCount(0) {}
 
-    ~GrTMultiMap() {
+    ~SkTMultiMap() {
         SkASSERT(fCount == 0);
         SkASSERT(fHash.count() == 0);
     }
index 1a81fe6..ccfe7fa 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "GrConfig.h"
 #include "GrTypes.h"
-#include "GrTMultiMap.h"
+#include "SkTMultiMap.h"
 #include "GrBinHashKey.h"
 #include "SkMessageBus.h"
 #include "SkTInternalLList.h"
@@ -334,7 +334,7 @@ private:
 
     void removeInvalidResource(GrResourceCacheEntry* entry);
 
-    GrTMultiMap<GrResourceCacheEntry, GrResourceKey> fCache;
+    SkTMultiMap<GrResourceCacheEntry, GrResourceKey> fCache;
 
     // We're an internal doubly linked list
     typedef SkTInternalLList<GrResourceCacheEntry> EntryList;