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

Side by Side Diff: src/utils/SkCityHash.h

Issue 15060008: Re-land r9059 with empty cityhash.gyp, instead of deleted cityhash.gyp (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/utils/SkBitmapHasher.cpp ('k') | src/utils/SkCityHash.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 /**
9 * Hash functions, using the CityHash algorithm.
10 *
11 * Results are guaranteed to be:
12 * 1. consistent across revisions of the library (for a given set
13 * of bytes, the checksum generated at one revision of the Skia
14 * library will match the one generated on any other revision of
15 * the Skia library)
16 * 2. consistent across platforms (for a given
17 * set of bytes, the checksum generated on one platform will
18 * match the one generated on any other platform)
19 */
20
21 #ifndef SkCityHash_DEFINED
22 #define SkCityHash_DEFINED
23
24 #include "SkTypes.h"
25
26 class SkCityHash : SkNoncopyable {
27 public:
28 /**
29 * Compute a 32-bit checksum for a given data block.
30 *
31 * @param data Memory address of the data block to be processed.
32 * @param size Size of the data block in bytes.
33 * @return checksum result
34 */
35 static uint32_t Compute32(const char *data, size_t size);
36
37 /**
38 * Compute a 64-bit checksum for a given data block.
39 *
40 * @param data Memory address of the data block to be processed.
41 * @param size Size of the data block in bytes.
42 * @return checksum result
43 */
44 static uint64_t Compute64(const char *data, size_t size);
45 };
46
47 #endif
OLDNEW
« no previous file with comments | « src/utils/SkBitmapHasher.cpp ('k') | src/utils/SkCityHash.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698