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

Unified Diff: src/core/SkChecksum.h

Issue 381253003: Revert of Slim Skia down to just one murmur3 implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkChecksum.h
diff --git a/src/core/SkChecksum.h b/src/core/SkChecksum.h
index daf87cf62ea5991d8d2ef3c4b2866c2290de2802..fe1e9584a20e8e87c2475a648af21e03db9e6710 100644
--- a/src/core/SkChecksum.h
+++ b/src/core/SkChecksum.h
@@ -51,10 +51,6 @@
return hash;
}
- // Remind compiler that our users will be intentionally violating strict aliasing by casting
- // their data to const uint32_t*, so don't apply any strict-aliasing-based optimizations.
- typedef uint32_t SK_ATTRIBUTE(may_alias) FourByteAligned;
-
/**
* Calculate 32-bit Murmur hash (murmur3).
* This should take 2-3x longer than SkChecksum::Compute, but is a considerably better hash.
@@ -65,7 +61,7 @@
* @param seed Initial hash seed. (optional)
* @return hash result
*/
- static uint32_t Murmur3(const FourByteAligned* data, size_t bytes, uint32_t seed=0) {
+ static uint32_t Murmur3(const uint32_t* data, size_t bytes, uint32_t seed=0) {
SkASSERTF(SkIsAlign4(bytes), "Expected 4-byte multiple, got %zu", bytes);
const size_t words = bytes/4;
@@ -98,7 +94,7 @@
* @param size Size of the data block in bytes. Must be a multiple of 4.
* @return checksum result
*/
- static uint32_t Compute(const FourByteAligned* data, size_t size) {
+ static uint32_t Compute(const uint32_t* data, size_t size) {
SkASSERT(SkIsAlign4(size));
/*
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698