aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkUtils.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-05-23 12:20:38 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-23 17:02:53 +0000
commit87db00111596d432908882a13982adde79793a7c (patch)
treef1eddaef5810ed9b6d72629508c6868fc6493c99 /src/core/SkUtils.h
parent5373609d90d8f84b75718b15f3522f9d2f4226cb (diff)
move sk_memset?? to SkOpts
This lets the compiler generate AVX versions with wider writes. Change-Id: Ia63825e70c72bdb4d14bef97d8b4ea4be54c9d84 Reviewed-on: https://skia-review.googlesource.com/17715 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkUtils.h')
-rw-r--r--src/core/SkUtils.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h
index 241a61ad2f..2ae6f87eea 100644
--- a/src/core/SkUtils.h
+++ b/src/core/SkUtils.h
@@ -10,15 +10,22 @@
#include "SkTypes.h"
#include "SkMath.h"
+#include "SkOpts.h"
/** Similar to memset(), but it assigns a 16, 32, or 64-bit value into the buffer.
@param buffer The memory to have value copied into it
@param value The value to be copied into buffer
@param count The number of times value should be copied into the buffer.
*/
-void sk_memset16(uint16_t buffer[], uint16_t value, int count);
-void sk_memset32(uint32_t buffer[], uint32_t value, int count);
-void sk_memset64(uint64_t buffer[], uint64_t value, int count);
+static inline void sk_memset16(uint16_t buffer[], uint16_t value, int count) {
+ SkOpts::memset16(buffer, value, count);
+}
+static inline void sk_memset32(uint32_t buffer[], uint32_t value, int count) {
+ SkOpts::memset32(buffer, value, count);
+}
+static inline void sk_memset64(uint64_t buffer[], uint64_t value, int count) {
+ SkOpts::memset64(buffer, value, count);
+}
///////////////////////////////////////////////////////////////////////////////
#define kMaxBytesInUTF8Sequence 4