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

Side by Side Diff: include/core/SkUtils.h

Issue 285313002: SSE2 implementation of memcpy32 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase and fix comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkBlitRow_D32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkUtils_DEFINED 8 #ifndef SkUtils_DEFINED
9 #define SkUtils_DEFINED 9 #define SkUtils_DEFINED
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 /** Similar to memset(), but it assigns a 32bit value into the buffer. 24 /** Similar to memset(), but it assigns a 32bit value into the buffer.
25 @param buffer The memory to have value copied into it 25 @param buffer The memory to have value copied into it
26 @param value The 32bit value to be copied into buffer 26 @param value The 32bit value to be copied into buffer
27 @param count The number of times value should be copied into the buffer. 27 @param count The number of times value should be copied into the buffer.
28 */ 28 */
29 void sk_memset32(uint32_t dst[], uint32_t value, int count); 29 void sk_memset32(uint32_t dst[], uint32_t value, int count);
30 typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count); 30 typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count);
31 SkMemset32Proc SkMemset32GetPlatformProc(); 31 SkMemset32Proc SkMemset32GetPlatformProc();
32 32
33 /** Similar to memcpy(), but it copies count 32bit values from src to dst.
34 @param dst The memory to have value copied into it
35 @param src The memory to have value copied from it
36 @param count The number of values should be copied.
37 */
38 void sk_memcpy32(uint32_t dst[], const uint32_t src[], int count);
39 typedef void (*SkMemcpy32Proc)(uint32_t dst[], const uint32_t src[], int count);
40 SkMemcpy32Proc SkMemcpy32GetPlatformProc();
41
33 /////////////////////////////////////////////////////////////////////////////// 42 ///////////////////////////////////////////////////////////////////////////////
34 43
35 #define kMaxBytesInUTF8Sequence 4 44 #define kMaxBytesInUTF8Sequence 4
36 45
37 #ifdef SK_DEBUG 46 #ifdef SK_DEBUG
38 int SkUTF8_LeadByteToCount(unsigned c); 47 int SkUTF8_LeadByteToCount(unsigned c);
39 #else 48 #else
40 #define SkUTF8_LeadByteToCount(c) ((((0xE5 << 24) >> ((unsigned)c >> 4 << 1)) & 3) + 1) 49 #define SkUTF8_LeadByteToCount(c) ((((0xE5 << 24) >> ((unsigned)c >> 4 << 1)) & 3) + 1)
41 #endif 50 #endif
42 51
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 109 }
101 ~SkAutoTrace() { 110 ~SkAutoTrace() {
102 SkDebugf("--- trace: %s Leave\n", fLabel); 111 SkDebugf("--- trace: %s Leave\n", fLabel);
103 } 112 }
104 private: 113 private:
105 const char* fLabel; 114 const char* fLabel;
106 }; 115 };
107 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace) 116 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace)
108 117
109 #endif 118 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBlitRow_D32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698