Lines Matching refs:uni
124 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) { in SkUTF8_FromUnichar() argument
125 if ((uint32_t)uni > 0x10FFFF) { in SkUTF8_FromUnichar()
130 if (uni <= 127) { in SkUTF8_FromUnichar()
132 *utf8 = (char)uni; in SkUTF8_FromUnichar()
141 SkDEBUGCODE(SkUnichar orig = uni;) in SkUTF8_FromUnichar()
143 while (uni > 0x7F >> count) { in SkUTF8_FromUnichar()
144 *p++ = (char)(0x80 | (uni & 0x3F)); in SkUTF8_FromUnichar()
145 uni >>= 6; in SkUTF8_FromUnichar()
155 *--utf8 = (char)(~(0xFF >> count) | uni); in SkUTF8_FromUnichar()
233 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t dst[]) { in SkUTF16_FromUnichar() argument
234 SkASSERT((unsigned)uni <= 0x10FFFF); in SkUTF16_FromUnichar()
236 int extra = (uni > 0xFFFF); in SkUTF16_FromUnichar()
242 dst[0] = SkToU16((0xD800 - 64) + (uni >> 10)); in SkUTF16_FromUnichar()
243 dst[1] = SkToU16(0xDC00 | (uni & 0x3FF)); in SkUTF16_FromUnichar()
248 dst[0] = SkToU16(uni); in SkUTF16_FromUnichar()