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

Unified Diff: src/core/SkCpu.h

Issue 2259133002: Detect CRC32 instructions on ARMv8. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | src/core/SkCpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCpu.h
diff --git a/src/core/SkCpu.h b/src/core/SkCpu.h
index 219ec698458b94b09a6d1d5a01c472a993962b7e..4fba1d4afed43827d791df2154c3ab05e5977554 100644
--- a/src/core/SkCpu.h
+++ b/src/core/SkCpu.h
@@ -27,6 +27,7 @@ struct SkCpu {
NEON = 1 << 0,
NEON_FMA = 1 << 1,
VFP_FP16 = 1 << 2,
+ CRC32 = 1 << 3,
};
static void CacheRuntimeFeatures();
@@ -79,6 +80,10 @@ inline bool SkCpu::Supports(uint32_t mask) {
features |= NEON|NEON_FMA|VFP_FP16;
#endif
+ #if defined(__ARM_FEATURE_CRC32)
+ features |= CRC32;
+ #endif
+
#endif
return (features & mask) == mask;
}
« no previous file with comments | « no previous file | src/core/SkCpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698