aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFGraphicState.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-08 09:06:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-08 09:06:28 -0700
commit4e97607d9a1cef66fac16f347c5ca813ec4f9515 (patch)
treee523cac97fae89a2abb1ec0d4c1fc87f86e3169f /src/pdf/SkPDFGraphicState.h
parent9a5a201472c3fb9f02b954ba09ae1ec13ebd50f4 (diff)
Use sse4.2 CRC32 instructions to hash when available.
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
Diffstat (limited to 'src/pdf/SkPDFGraphicState.h')
-rw-r--r--src/pdf/SkPDFGraphicState.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFGraphicState.h b/src/pdf/SkPDFGraphicState.h
index 84491ba0d3..49723bd723 100644
--- a/src/pdf/SkPDFGraphicState.h
+++ b/src/pdf/SkPDFGraphicState.h
@@ -10,7 +10,7 @@
#define SkPDFGraphicState_DEFINED
#include "SkPDFTypes.h"
-#include "SkChecksum.h"
+#include "SkOpts.h"
class SkPaint;
class SkPDFCanon;
@@ -63,7 +63,7 @@ public:
bool operator==(const SkPDFGraphicState& rhs) const {
return 0 == memcmp(&fStrokeWidth, &rhs.fStrokeWidth, 12);
}
- uint32_t hash() const { return SkChecksum::Murmur3(&fStrokeWidth, 12); }
+ uint32_t hash() const { return SkOpts::hash(&fStrokeWidth, 12); }
private:
const SkScalar fStrokeWidth;