Index: src/core/SkCpu.cpp |
diff --git a/src/core/SkCpu.cpp b/src/core/SkCpu.cpp |
index 0858abd40a7fcf22328926797c04ce034561372f..0f1c7511a645481f6b04caf5ba13a182933d0d74 100644 |
--- a/src/core/SkCpu.cpp |
+++ b/src/core/SkCpu.cpp |
@@ -71,6 +71,19 @@ |
return features; |
} |
+#elif defined(SK_CPU_ARM64) && \ |
+ defined(SK_BUILD_FOR_ANDROID) && \ |
+ !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) |
+ #include <cpu-features.h> |
+ |
+ static uint32_t read_cpu_features() { |
+ uint32_t features = 0; |
+ |
+ uint64_t android_features = android_getCpuFeatures(); |
+ if (android_features & ANDROID_CPU_ARM64_FEATURE_CRC32) { features |= SkCpu::CRC32; } |
+ return features; |
+ } |
+ |
#else |
static uint32_t read_cpu_features() { |
return 0; |