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

Unified Diff: src/core/SkOpts.cpp

Issue 2260823002: Use ARMv8 CRC32 instructions for SkOpts::hash(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/opts.gypi ('k') | src/opts/SkChecksum_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkOpts.cpp
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index a4da1116306834d9dc363c9fdb1c13abcf69134e..95781a39778fcb065cd82b2cc77b6cd05d5f5d4d 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -81,15 +81,22 @@ namespace SkOpts {
void Init_sse42();
void Init_avx();
void Init_avx2() {}
+ void Init_crc32();
static void init() {
- #if defined(SK_CPU_X86) && !defined(SK_BUILD_NO_OPTS)
+#if !defined(SK_BUILD_NO_OPTS)
+ #if defined(SK_CPU_X86)
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_ssse3(); }
if (SkCpu::Supports(SkCpu::SSE41)) { Init_sse41(); }
if (SkCpu::Supports(SkCpu::SSE42)) { Init_sse42(); }
if (SkCpu::Supports(SkCpu::AVX )) { Init_avx(); }
if (SkCpu::Supports(SkCpu::AVX2 )) { Init_avx2(); }
+
+ #elif defined(SK_CPU_ARM64)
+ if (SkCpu::Supports(SkCpu::CRC32)) { Init_crc32(); }
+
#endif
+#endif
}
void Init() {
« no previous file with comments | « gyp/opts.gypi ('k') | src/opts/SkChecksum_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698