| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } else { | 54 } else { |
| 55 sk_memset32_large(dst, value, count); | 55 sk_memset32_large(dst, value, count); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count); | 59 typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count); |
| 60 SkMemset32Proc SkMemset32GetPlatformProc(); | 60 SkMemset32Proc SkMemset32GetPlatformProc(); |
| 61 | 61 |
| 62 #undef SK_SMALL_MEMSET | 62 #undef SK_SMALL_MEMSET |
| 63 | 63 |
| 64 /** Similar to memcpy(), but it copies count 32bit values from src to dst. | |
| 65 @param dst The memory to have value copied into it | |
| 66 @param src The memory to have value copied from it | |
| 67 @param count The number of values should be copied. | |
| 68 */ | |
| 69 void sk_memcpy32(uint32_t dst[], const uint32_t src[], int count); | |
| 70 typedef void (*SkMemcpy32Proc)(uint32_t dst[], const uint32_t src[], int count); | |
| 71 SkMemcpy32Proc SkMemcpy32GetPlatformProc(); | |
| 72 | |
| 73 /////////////////////////////////////////////////////////////////////////////// | 64 /////////////////////////////////////////////////////////////////////////////// |
| 74 | 65 |
| 75 #define kMaxBytesInUTF8Sequence 4 | 66 #define kMaxBytesInUTF8Sequence 4 |
| 76 | 67 |
| 77 #ifdef SK_DEBUG | 68 #ifdef SK_DEBUG |
| 78 int SkUTF8_LeadByteToCount(unsigned c); | 69 int SkUTF8_LeadByteToCount(unsigned c); |
| 79 #else | 70 #else |
| 80 #define SkUTF8_LeadByteToCount(c) ((((0xE5 << 24) >> ((unsigned)c >> 4 <<
1)) & 3) + 1) | 71 #define SkUTF8_LeadByteToCount(c) ((((0xE5 << 24) >> ((unsigned)c >> 4 <<
1)) & 3) + 1) |
| 81 #endif | 72 #endif |
| 82 | 73 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 131 } |
| 141 ~SkAutoTrace() { | 132 ~SkAutoTrace() { |
| 142 SkDebugf("--- trace: %s Leave\n", fLabel); | 133 SkDebugf("--- trace: %s Leave\n", fLabel); |
| 143 } | 134 } |
| 144 private: | 135 private: |
| 145 const char* fLabel; | 136 const char* fLabel; |
| 146 }; | 137 }; |
| 147 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace) | 138 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace) |
| 148 | 139 |
| 149 #endif | 140 #endif |
| OLD | NEW |