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

Unified Diff: src/opts/SkUtils_opts_arm.cpp

Issue 157863003: Split opts_check_arm.cpp into per-class files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « src/opts/SkMorphology_opts_arm.cpp ('k') | src/opts/opts_check_arm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkUtils_opts_arm.cpp
diff --git a/src/opts/SkUtils_opts_arm.cpp b/src/opts/SkUtils_opts_arm.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2c57a3e9774e0d987cfb6ab1b12b8fd3e4a06338
--- /dev/null
+++ b/src/opts/SkUtils_opts_arm.cpp
@@ -0,0 +1,53 @@
+/*
+ * 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 "SkUtils.h"
+#include "SkUtilsArm.h"
+
+#if defined(SK_CPU_LENDIAN) && !SK_ARM_NEON_IS_NONE
+extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
+extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count);
+#endif
+
+#if defined(SK_CPU_LENDIAN)
+extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count);
+extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count);
+#endif
+
+SkMemset16Proc SkMemset16GetPlatformProc() {
+ // FIXME: memset.arm.S is using syntax incompatible with XCode
+#if !defined(SK_CPU_LENDIAN) || defined(SK_BUILD_FOR_IOS)
+ return NULL;
+#elif SK_ARM_NEON_IS_DYNAMIC
+ if (sk_cpu_arm_has_neon()) {
+ return memset16_neon;
+ } else {
+ return arm_memset16;
+ }
+#elif SK_ARM_NEON_IS_ALWAYS
+ return memset16_neon;
+#else
+ return arm_memset16;
+#endif
+}
+
+SkMemset32Proc SkMemset32GetPlatformProc() {
+ // FIXME: memset.arm.S is using syntax incompatible with XCode
+#if !defined(SK_CPU_LENDIAN) || defined(SK_BUILD_FOR_IOS)
+ return NULL;
+#elif SK_ARM_NEON_IS_DYNAMIC
+ if (sk_cpu_arm_has_neon()) {
+ return memset32_neon;
+ } else {
+ return arm_memset32;
+ }
+#elif SK_ARM_NEON_IS_ALWAYS
+ return memset32_neon;
+#else
+ return arm_memset32;
+#endif
+}
« no previous file with comments | « src/opts/SkMorphology_opts_arm.cpp ('k') | src/opts/opts_check_arm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698