Lines Matching refs:uni
241 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[]) { in SkUTF8_FromUnichar() argument
242 if ((uint32_t)uni > 0x10FFFF) { in SkUTF8_FromUnichar()
247 if (uni <= 127) { in SkUTF8_FromUnichar()
249 *utf8 = (char)uni; in SkUTF8_FromUnichar()
258 SkDEBUGCODE(SkUnichar orig = uni;) in SkUTF8_FromUnichar()
260 while (uni > 0x7F >> count) { in SkUTF8_FromUnichar()
261 *p++ = (char)(0x80 | (uni & 0x3F)); in SkUTF8_FromUnichar()
262 uni >>= 6; in SkUTF8_FromUnichar()
272 *--utf8 = (char)(~(0xFF >> count) | uni); in SkUTF8_FromUnichar()
350 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t dst[]) { in SkUTF16_FromUnichar() argument
351 SkASSERT((unsigned)uni <= 0x10FFFF); in SkUTF16_FromUnichar()
353 int extra = (uni > 0xFFFF); in SkUTF16_FromUnichar()
359 dst[0] = SkToU16((0xD800 - 64) + (uni >> 10)); in SkUTF16_FromUnichar()
360 dst[1] = SkToU16(0xDC00 | (uni & 0x3FF)); in SkUTF16_FromUnichar()
365 dst[0] = SkToU16(uni); in SkUTF16_FromUnichar()