| 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 12 matching lines...) Expand all Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |