aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ChecksumTest.cpp
Commit message (Collapse)AuthorAge
* add missing includeGravatar mtklein2016-08-08
| | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia:Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Review-Url: https://codereview.chromium.org/2226783002
* Use sse4.2 CRC32 instructions to hash when available.Gravatar mtklein2016-08-08
| | | | | | | | | | | | About 9x faster than Murmur3 for long inputs. Most of this is a mechanical change from SkChecksum::Murmur3(...) to SkOpts::hash(...). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208903002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review-Url: https://codereview.chromium.org/2208903002
* Switch uses of SkChecksum::Compute to Murmur3.Gravatar mtklein2015-11-16
| | | | | | | | | | | | | | | SkChecksum::Compute is a very, very poorly distributed hash function. This replaces all remaining uses with Murmur3. The only interesting stuff is in src/gpu. BUG=skia: Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba Review URL: https://codereview.chromium.org/1436973003
* Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 ↵Gravatar mtklein2015-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/1436973003/ ) Reason for revert: gotta put back *compute = 0. Original issue's description: > Switch uses of SkChecksum::Compute to Murmur3. > > SkChecksum::Compute is a very, very poorly distributed hash function. > This replaces all remaining uses with Murmur3. > > The only interesting stuff is in src/gpu. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac > > Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba TBR=bsalomon@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1448023005
* Switch uses of SkChecksum::Compute to Murmur3.Gravatar mtklein2015-11-16
| | | | | | | | | | | | | SkChecksum::Compute is a very, very poorly distributed hash function. This replaces all remaining uses with Murmur3. The only interesting stuff is in src/gpu. BUG=skia: Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac Review URL: https://codereview.chromium.org/1436973003
* Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 ↵Gravatar mtklein2015-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:20001 of https://codereview.chromium.org/1436973003/ ) Reason for revert: I would not have expected this to change any images. Looks like it's changed both MSAA and non-MSAA GMs: https://gold.skia.org/search2?blame=1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm Original issue's description: > Switch uses of SkChecksum::Compute to Murmur3. > > SkChecksum::Compute is a very, very poorly distributed hash function. > This replaces all remaining uses with Murmur3. > > The only interesting stuff is in src/gpu. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac TBR=bsalomon@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1445523003
* Switch uses of SkChecksum::Compute to Murmur3.Gravatar mtklein2015-11-12
| | | | | | | | | | | SkChecksum::Compute is a very, very poorly distributed hash function. This replaces all remaining uses with Murmur3. The only interesting stuff is in src/gpu. BUG=skia: Review URL: https://codereview.chromium.org/1436973003
* SkTHash: hash from fnptr to functor typeGravatar mtklein2015-10-15
| | | | | | | | Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated. Using a functor does. BUG=skia: Review URL: https://codereview.chromium.org/1405053002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Some usability ideas around SkTHash.Gravatar mtklein2015-03-20
| | | | | | | | | | | | | | - By default, use new SkGoodHash to hash keys, which is: * for 4 byte values, use SkChecksum::Mix, * for SkStrings, use SkChecksum::Murmur3 on the data, * for other structs, shallow hash the struct with Murmur3. - Expand SkChecksum::Murmur3 to support non-4-byte-aligned data. - Add const foreach() methods. - Have foreach() take a functor, which allows lambdas. BUG=skia: Review URL: https://codereview.chromium.org/1021033002
* Revert of Slim Skia down to just one murmur3 implementation. ↵Gravatar reed2014-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/376183004/) Reason for revert: broke 10.6 compile [17:13:56.863876] [4/336] CXX obj/src/core/core.SkBBoxHierarchyRecord.o [17:13:56.863997] FAILED: c++ -MMD -MF obj/src/core/core.SkBBoxRecord.o.d -DSK_INTERNAL -DSK_GAMMA_SRGB -DSK_GAMMA_APPLY_TO_A8 -DSK_SCALAR_TO_FLOAT_EXCLUDED -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_SUPPORT_GPU=1 -DSK_SUPPORT_OPENCL=0 -DSK_FORCE_DISTANCEFIELD_FONTS=0 -DSK_SCALAR_IS_FLOAT -DSK_BUILD_FOR_MAC -DSK_USE_POSIX_THREADS -DSK_RELEASE -DNDEBUG -I../../include/config -I../../include/core -I../../include/pathops -I../../include/pipe -I../../include/ports -I../../include/utils -I../../include/xml -I../../src/core -I../../src/sfnt -I../../src/image -I../../src/opts -I../../src/utils -I../../include/utils/mac -I../../include/gpu -I../../src/gpu -fasm-blocks -mpascal-strings -O3 -gdwarf-2 -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -mssse3 -fvisibility=hidden -fvisibility-inlines-hidden -c ../../src/core/SkBBoxRecord.cpp -o obj/src/core/core.SkBBoxRecord.o [17:13:56.864085] In file included from ../../src/core/SkPictureFlat.h:14, [17:13:56.864130] from ../../src/core/SkPictureData.h:14, [17:13:56.864173] from ../../src/core/SkPictureRecord.h:18, [17:13:56.864217] from ../../src/core/SkBBoxRecord.h:12, [17:13:56.864261] from ../../src/core/SkBBoxRecord.cpp:9: [17:13:56.864336] ../../src/core/SkChecksum.h: In static member function ‘static uint32_t SkChecksum::Compute(const uint32_t*, size_t)’: [17:13:56.864397] ../../src/core/SkChecksum.h:127: error: invalid conversion from ‘const uint32_t*’ to ‘const uint32_t*’ [17:13:56.864462] ../../src/core/SkChecksum.h:128: error: invalid conversion from ‘const uint32_t*’ to ‘const uint32_t*’ [17:13:56.864510] ../../src/core/SkChecksum.h:129: error: comparison between distinct pointer types ‘const uint32_t*’ and ‘const uint32_t*’ lacks a cast Original issue's description: > Slim Skia down to just one murmur3 implementation. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6ac0037b70410ff7d5ce5788bc89314223e1a587 > > Committed: https://skia.googlesource.com/skia/+/67a3271f0de9ccc32d559b042b862528272047cc > > Committed: https://skia.googlesource.com/skia/+/53d435990bdb4d14df78013da45a9364d0287ebe R=mtklein@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, mtklein@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/381253003
* Slim Skia down to just one murmur3 implementation.Gravatar mtklein2014-07-10
| | | | | | | | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/6ac0037b70410ff7d5ce5788bc89314223e1a587 Committed: https://skia.googlesource.com/skia/+/67a3271f0de9ccc32d559b042b862528272047cc R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/376183004
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert Checksum test to DEF_TEST() macro.Gravatar commit-bot@chromium.org2014-01-09
| | | | | | | | | | | | BUG=None TEST=tests R=mtklein@google.com, bungeman@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/126743003 git-svn-id: http://skia.googlecode.com/svn/trunk@12996 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkChecksum::Murmur3.Gravatar commit-bot@chromium.org2013-07-23
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/19500020 git-svn-id: http://skia.googlecode.com/svn/trunk@10292 2bbb7eff-a529-9590-31e7-b0007b416f81
* Re-land r9059 with empty cityhash.gyp, instead of deleted cityhash.gypGravatar epoger@google.com2013-05-08
| | | | | | | | | | R=rmistry@google.com Review URL: https://codereview.chromium.org/15060008/ git-svn-id: http://skia.googlecode.com/svn/trunk@9064 2bbb7eff-a529-9590-31e7-b0007b416f81
* Roll out r9059 to unbreak botsGravatar epoger@google.com2013-05-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove third-party cityhash, unused since r8992Gravatar epoger@google.com2013-05-08
| | | | | | | | 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
* rename SkBitmapChecksummer as SkBitmapHasher, and prepare for it to possibly useGravatar epoger@google.com2013-04-12
| | | | | | | some algorithm other than CityHash Review URL: https://codereview.chromium.org/14170010 git-svn-id: http://skia.googlecode.com/svn/trunk@8639 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create SkBitmapChecksummer and associated SkBitmapTransformerGravatar epoger@google.com2012-12-12
| | | | | | | As needed to start capturing gm image checksums. Review URL: https://codereview.appspot.com/6920050 git-svn-id: http://skia.googlecode.com/svn/trunk@6759 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mark 64-bit constants as ULL to fix broken 32-bit Mac 10.6 buildGravatar epoger@google.com2012-12-07
| | | | | | | TBR=bungeman Review URL: https://codereview.appspot.com/6867079 git-svn-id: http://skia.googlecode.com/svn/trunk@6704 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace SkConsistentChecksum with SkCityHash (now including CityHash via DEPS)Gravatar epoger@google.com2012-12-07
| | | | | | | Alternative to https://codereview.appspot.com/6847087/ ('Change SkConsistentChecksum to use SuperFastHash') Review URL: https://codereview.appspot.com/6867060 git-svn-id: http://skia.googlecode.com/svn/trunk@6701 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add self-test that reveals SkChecksum weaknessGravatar epoger@google.com2012-11-21
| | | | | | Review URL: https://codereview.appspot.com/6845064 git-svn-id: http://skia.googlecode.com/svn/trunk@6535 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split off SkConsistentChecksum from SkChecksumGravatar epoger@google.com2012-11-02
as part of https://goto.google.com/ImprovingTheSkiaRebaseliningProcess Review URL: https://codereview.appspot.com/6820074 git-svn-id: http://skia.googlecode.com/svn/trunk@6270 2bbb7eff-a529-9590-31e7-b0007b416f81