aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkMorphology_opts_arm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opts/SkMorphology_opts_arm.cpp')
-rw-r--r--src/opts/SkMorphology_opts_arm.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/opts/SkMorphology_opts_arm.cpp b/src/opts/SkMorphology_opts_arm.cpp
new file mode 100644
index 0000000000..2bba4929c2
--- /dev/null
+++ b/src/opts/SkMorphology_opts_arm.cpp
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2014 ARM Ltd.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkMorphology_opts.h"
+#include "SkMorphology_opts_neon.h"
+#include "SkUtilsArm.h"
+
+SkMorphologyImageFilter::Proc 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
+}