| Index: src/utils/SkBitmapHasher.h
|
| ===================================================================
|
| --- src/utils/SkBitmapHasher.h (revision 8826)
|
| +++ src/utils/SkBitmapHasher.h (working copy)
|
| @@ -11,11 +11,21 @@
|
|
|
| #include "SkBitmap.h"
|
| #include "SkBitmapTransformer.h"
|
| +#include "SkHashDigest.h"
|
|
|
| -// TODO(epoger): Soon, SkHashDigest will become a real class of its own,
|
| -// and callers won't be able to assume it converts to/from a uint64_t.
|
| -typedef uint64_t SkHashDigest;
|
| +// TODO(epoger): Once we figure out which bitmap hash algorithm to use
|
| +// long-term, pick one BITMAP_HASH_TYPE setting and delete the unused code.
|
| +//
|
| +// For now, disable this to keep the old uint64_t bitmap hash.
|
| +#define BITMAP_HASH_TYPE_SkHashDigest
|
|
|
| +// Set automatically using the above.
|
| +#ifdef BITMAP_HASH_TYPE_SkHashDigest
|
| + #define BITMAP_HASH_TYPE SkHashDigest
|
| +#else
|
| + #define BITMAP_HASH_TYPE uint64_t
|
| +#endif
|
| +
|
| /**
|
| * Static class that can generate an SkHashDigest from an SkBitmap.
|
| */
|
| @@ -31,12 +41,12 @@
|
| * intermediate SkBitmap and copy the pixels over to it... so in some
|
| * cases, performance and memory usage can suffer.
|
| */
|
| - static bool ComputeDigest(const SkBitmap& bitmap, SkHashDigest *result);
|
| + static bool ComputeDigest(const SkBitmap& bitmap, BITMAP_HASH_TYPE *result);
|
|
|
| private:
|
| static bool ComputeDigestInternal(const SkBitmap& bitmap,
|
| const SkBitmapTransformer& transformer,
|
| - SkHashDigest *result);
|
| + BITMAP_HASH_TYPE *result);
|
| };
|
|
|
| #endif
|
|
|