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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 | 72 |
73 int SkUTF16_CountUnichars(const uint16_t utf16[]); | 73 int SkUTF16_CountUnichars(const uint16_t utf16[]); |
74 int SkUTF16_CountUnichars(const uint16_t utf16[], | 74 int SkUTF16_CountUnichars(const uint16_t utf16[], |
75 int numberOf16BitValues); | 75 int numberOf16BitValues); |
76 // returns the current unichar and then moves past it (*p++) | 76 // returns the current unichar and then moves past it (*p++) |
77 SkUnichar SkUTF16_NextUnichar(const uint16_t**); | 77 SkUnichar SkUTF16_NextUnichar(const uint16_t**); |
78 // this guy backs up to the previus unichar value, and returns it (*--p) | 78 // this guy backs up to the previus unichar value, and returns it (*--p) |
79 SkUnichar SkUTF16_PrevUnichar(const uint16_t**); | 79 SkUnichar SkUTF16_PrevUnichar(const uint16_t**); |
80 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = NULL); | 80 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = NULL); |
81 | 81 |
82 size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues, | 82 size_t SkUTF16_ToUTF8(const uint16_t utf16[], size_t numberOf16BitValues, |
bsalomon
2013/10/29 14:40:36
not sure about this.
robertphillips
2013/11/18 20:22:41
Done.
| |
83 char utf8[] = NULL); | 83 char utf8[] = NULL); |
84 | 84 |
85 inline bool SkUnichar_IsVariationSelector(SkUnichar uni) { | 85 inline bool SkUnichar_IsVariationSelector(SkUnichar uni) { |
86 /* The 'true' ranges are: | 86 /* The 'true' ranges are: |
87 * 0x180B <= uni <= 0x180D | 87 * 0x180B <= uni <= 0x180D |
88 * 0xFE00 <= uni <= 0xFE0F | 88 * 0xFE00 <= uni <= 0xFE0F |
89 * 0xE0100 <= uni <= 0xE01EF | 89 * 0xE0100 <= uni <= 0xE01EF |
90 */ | 90 */ |
91 if (uni < 0x180B || uni > 0xE01EF) { | 91 if (uni < 0x180B || uni > 0xE01EF) { |
92 return false; | 92 return false; |
(...skipping 15 matching lines...) Expand all Loading... | |
108 SkDebugf("--- trace: %s Enter\n", fLabel); | 108 SkDebugf("--- trace: %s Enter\n", fLabel); |
109 } | 109 } |
110 ~SkAutoTrace() { | 110 ~SkAutoTrace() { |
111 SkDebugf("--- trace: %s Leave\n", fLabel); | 111 SkDebugf("--- trace: %s Leave\n", fLabel); |
112 } | 112 } |
113 private: | 113 private: |
114 const char* fLabel; | 114 const char* fLabel; |
115 }; | 115 }; |
116 | 116 |
117 #endif | 117 #endif |
OLD | NEW |