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

Unified Diff: src/gpu/effects/GrTextureStripAtlas.cpp

Issue 1233933002: Get rid of GrMurmur3Hash (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tidy Created 5 years, 5 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/gpu/effects/GrTextureStripAtlas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureStripAtlas.cpp
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 8610691a43f04fa9f24facf28fe3bd036c1cc001..e8de4d7c30f769a2eea1f8d63a33e1157972a64d 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -18,7 +18,7 @@
#endif
class GrTextureStripAtlas::Hash : public SkTDynamicHash<GrTextureStripAtlas::AtlasEntry,
- GrTextureStripAtlas::AtlasEntry::Key> {};
+ GrTextureStripAtlas::Desc> {};
int32_t GrTextureStripAtlas::gCacheCount = 0;
@@ -40,7 +40,7 @@ void GrTextureStripAtlas::CleanUp(const GrContext*, void* info) {
AtlasEntry* entry = static_cast<AtlasEntry*>(info);
// remove the cache entry
- GetCache()->remove(entry->fKey);
+ GetCache()->remove(entry->fDesc);
// remove the actual entry
SkDELETE(entry);
@@ -52,14 +52,12 @@ void GrTextureStripAtlas::CleanUp(const GrContext*, void* info) {
}
GrTextureStripAtlas* GrTextureStripAtlas::GetAtlas(const GrTextureStripAtlas::Desc& desc) {
- AtlasEntry::Key key;
- key.setKeyData(desc.asKey());
- AtlasEntry* entry = GetCache()->find(key);
+ AtlasEntry* entry = GetCache()->find(desc);
if (NULL == entry) {
entry = SkNEW(AtlasEntry);
entry->fAtlas = SkNEW_ARGS(GrTextureStripAtlas, (desc));
- entry->fKey = key;
+ entry->fDesc = desc;
desc.fContext->addCleanUp(CleanUp, entry);
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698