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

Unified Diff: src/opts/opts_check_arm.cpp

Issue 68123003: Implement a NEON version of morphology. This is good for ~2.2X speedup on Tegra3. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix ARM_NEON_IS_NONE. Created 7 years, 1 month 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 | « src/opts/SkMorphology_opts_neon.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+}
« no previous file with comments | « src/opts/SkMorphology_opts_neon.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698