diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-02 17:29:44 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-02 17:29:44 +0000 |
commit | 5ccbe38285490028307ea383cf4930c87079cf6e (patch) | |
tree | 39f2573c42b6168cbccd369f90f097b144b64beb | |
parent | ab69788571ed968dc0bcc934b9979195c6a28310 (diff) |
undo accidental checkin
git-svn-id: http://skia.googlecode.com/svn/trunk@4422 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkChecksum.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/include/core/SkChecksum.h b/include/core/SkChecksum.h index 020403f607..ab88cbc01a 100644 --- a/include/core/SkChecksum.h +++ b/include/core/SkChecksum.h @@ -59,27 +59,11 @@ inline uint32_t SkComputeChecksum32(const uint32_t* ptr, size_t size) { SkASSERT(SkIsAlign4(size)); SkASSERT(SkIsAlign4((intptr_t)ptr)); - uint32_t result; - - if (8 == sizeof(void*)) { - uint64_t result8 = 0; - if (size & 4) { - result8 = *ptr++; // initial 32bit value - } - const uint64_t* ptr8 = (const uint64_t*)ptr; - const uint64_t* stop = ptr8 + (size >> 3); - while (ptr8 < stop) { - SkCHECKSUM_MASH(result8, *ptr8); - ptr8++; - } - result = static_cast<uint32_t>(result8 ^ (result8 >> 32)); - } else { - result = 0; - const uint32_t* stop = ptr + (size >> 2); - while (ptr < stop) { - SkCHECKSUM_MASH(result, *ptr); - ptr++; - } + const uint32_t* stop = ptr + (size >> 2); + uint32_t result = 0; + while (ptr < stop) { + SkCHECKSUM_MASH(result, *ptr); + ptr++; } return result; } |