aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-03-20 13:48:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-20 13:48:42 -0700
commit02f46cf878535fb79317d15ebed66dfa3f2cd772 (patch)
treea1a4c7994b395cd2ef88b4df62057d728d61fb4d /src/gpu/gl/GrGLCaps.h
parentce6acc91085c4b6d87d4bac84e66193908e648f9 (diff)
Some usability ideas around SkTHash.
- By default, use new SkGoodHash to hash keys, which is: * for 4 byte values, use SkChecksum::Mix, * for SkStrings, use SkChecksum::Murmur3 on the data, * for other structs, shallow hash the struct with Murmur3. - Expand SkChecksum::Murmur3 to support non-4-byte-aligned data. - Add const foreach() methods. - Have foreach() take a functor, which allows lambdas. BUG=skia: Review URL: https://codereview.chromium.org/1021033002
Diffstat (limited to 'src/gpu/gl/GrGLCaps.h')
-rw-r--r--src/gpu/gl/GrGLCaps.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 1b77ed0e32..e0d2bf6d7c 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -403,13 +403,8 @@ private:
&& fType == rhs.fType
&& fFboFormat == rhs.fFboFormat;
}
- static uint32_t Hash(const ReadPixelsSupportedFormat& r) {
- return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(&r), sizeof(r));
- }
};
-
- mutable SkTHashMap<ReadPixelsSupportedFormat, bool, ReadPixelsSupportedFormat::Hash>
- fReadPixelsSupportedCache;
+ mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCache;
typedef GrDrawTargetCaps INHERITED;
};