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

Unified Diff: src/core/SkUtils.cpp

Issue 292663013: sk_memcpy32 should fall back on libc memcpy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkUtils.cpp
diff --git a/src/core/SkUtils.cpp b/src/core/SkUtils.cpp
index c65947dfe933e2a544b0da227421bf5e39e822ad..ca18e0cb2d08138c64f16ff48d5e6d3e2fe32fb1 100644
--- a/src/core/SkUtils.cpp
+++ b/src/core/SkUtils.cpp
@@ -34,18 +34,6 @@
*(dst)++ = value; *(dst)++ = value; \
*(dst)++ = value; *(dst)++ = value; \
} while (0)
-
-#define copy_16_longs(dst, src) \
- do { \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- *(dst)++ = *(src)++; *(dst)++ = *(src)++; \
- } while (0)
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -122,21 +110,7 @@ static void sk_memset32_portable(uint32_t dst[], uint32_t value, int count) {
}
static void sk_memcpy32_portable(uint32_t dst[], const uint32_t src[], int count) {
- SkASSERT(dst != NULL && count >= 0);
-
- int sixteenlongs = count >> 4;
- if (sixteenlongs) {
- do {
- copy_16_longs(dst, src);
- } while (--sixteenlongs != 0);
- count &= 15;
- }
-
- if (count) {
- do {
- *dst++ = *src++;
- } while (--count != 0);
- }
+ memcpy(dst, src, count * sizeof(uint32_t));
}
static void choose_memset16(SkMemset16Proc* proc) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698