From aaf7343e16c4bf9f9c6f07968689669fe6ba71d7 Mon Sep 17 00:00:00 2001 From: "epoger@google.com" Date: Wed, 8 May 2013 14:49:50 +0000 Subject: Remove third-party cityhash, unused since r8992 R=djsollen@google.com Review URL: https://codereview.chromium.org/15027013 git-svn-id: http://skia.googlecode.com/svn/trunk@9059 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/utils/SkBitmapHasher.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/utils/SkBitmapHasher.cpp') diff --git a/src/utils/SkBitmapHasher.cpp b/src/utils/SkBitmapHasher.cpp index 82cbe9fa7e..5342d18d10 100644 --- a/src/utils/SkBitmapHasher.cpp +++ b/src/utils/SkBitmapHasher.cpp @@ -10,12 +10,7 @@ #include "SkEndian.h" #include "SkImageEncoder.h" -#ifdef BITMAPHASHER_USES_TRUNCATED_MD5 #include "SkMD5.h" -#else -#include "SkCityHash.h" -#include "SkStream.h" -#endif /** * Write an int32 value to a stream in little-endian order. @@ -37,16 +32,7 @@ static inline uint64_t first_8_bytes_as_uint64(const uint8_t *bytearray) { /*static*/ bool SkBitmapHasher::ComputeDigestInternal(const SkBitmap& bitmap, SkHashDigest *result) { -#ifdef BITMAPHASHER_USES_TRUNCATED_MD5 SkMD5 out; -#else - size_t pixelBufferSize = bitmap.width() * bitmap.height() * 4; - size_t totalBufferSize = pixelBufferSize + 2 * sizeof(uint32_t); - - SkAutoMalloc bufferManager(totalBufferSize); - char *bufferStart = static_cast(bufferManager.get()); - SkMemoryWStream out(bufferStart, totalBufferSize); -#endif // start with the x/y dimensions write_int32_to_buffer(SkToU32(bitmap.width()), &out); @@ -58,13 +44,9 @@ static inline uint64_t first_8_bytes_as_uint64(const uint8_t *bytearray) { return false; } -#ifdef BITMAPHASHER_USES_TRUNCATED_MD5 SkMD5::Digest digest; out.finish(digest); *result = first_8_bytes_as_uint64(digest.data); -#else - *result = SkCityHash::Compute64(bufferStart, totalBufferSize); -#endif return true; } -- cgit v1.2.3