Index: src/opts/opts_check_arm.cpp |
diff --git a/src/opts/opts_check_arm.cpp b/src/opts/opts_check_arm.cpp |
index ba407d71ec9a351d6d9d8f5a23e423ea411cadbc..a9afa75b07eddde3b304a9f9a251eaffa71afe5f 100644 |
--- a/src/opts/opts_check_arm.cpp |
+++ b/src/opts/opts_check_arm.cpp |
@@ -17,6 +17,8 @@ |
#include "SkUtils.h" |
#include "SkUtilsArm.h" |
+#include "SkMorphology_opts.h" |
+#include "SkMorphology_opts_neon.h" |
#if defined(SK_CPU_LENDIAN) && !SK_ARM_NEON_IS_NONE |
extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count); |
@@ -65,3 +67,27 @@ SkMemset32Proc SkMemset32GetPlatformProc() { |
SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { |
return NULL; |
} |
+ |
+SkMorphologyProc SkMorphologyGetPlatformProc(SkMorphologyProcType type) { |
+#if SK_ARM_NEON_IS_NONE |
+ return NULL; |
+#else |
+#if SK_ARM_NEON_IS_DYNAMIC |
+ if (!sk_cpu_arm_has_neon()) { |
+ return NULL; |
+ } |
+#endif |
+ switch (type) { |
+ case kDilateX_SkMorphologyProcType: |
+ return SkDilateX_neon; |
+ case kDilateY_SkMorphologyProcType: |
+ return SkDilateY_neon; |
+ case kErodeX_SkMorphologyProcType: |
+ return SkErodeX_neon; |
+ case kErodeY_SkMorphologyProcType: |
+ return SkErodeY_neon; |
+ default: |
+ return NULL; |
+ } |
+#endif |
+} |