include/core/SkUtils.h File Reference

#include "SkTypes.h"
Include dependency graph for SkUtils.h:

Go to the source code of this file.

Classes

class  SkAutoTrace
class  SkAutoMemoryUsageProbe

Defines

#define sk_memset16(dst, value, count)   sk_memset16_portable(dst, value, count)
#define sk_memset32(dst, value, count)   sk_memset32_portable(dst, value, count)
#define kMaxBytesInUTF8Sequence   4
#define SkUTF16_IsHighSurrogate(c)   (((c) & 0xFC00) == 0xD800)
#define SkUTF16_IsLowSurrogate(c)   (((c) & 0xFC00) == 0xDC00)

Functions

void sk_memset16_portable (uint16_t dst[], uint16_t value, int count)
void sk_memset32_portable (uint32_t dst[], uint32_t value, int count)
int SkUTF8_LeadByteToCount (unsigned c)
int SkUTF8_CountUTF8Bytes (const char utf8[])
int SkUTF8_CountUnichars (const char utf8[])
int SkUTF8_CountUnichars (const char utf8[], size_t byteLength)
SkUnichar SkUTF8_ToUnichar (const char utf8[])
SkUnichar SkUTF8_NextUnichar (const char **)
SkUnichar SkUTF8_PrevUnichar (const char **)
size_t SkUTF8_FromUnichar (SkUnichar uni, char utf8[]=NULL)
int SkUTF16_CountUnichars (const uint16_t utf16[])
int SkUTF16_CountUnichars (const uint16_t utf16[], int numberOf16BitValues)
SkUnichar SkUTF16_NextUnichar (const uint16_t **)
SkUnichar SkUTF16_PrevUnichar (const uint16_t **)
size_t SkUTF16_FromUnichar (SkUnichar uni, uint16_t utf16[]=NULL)
size_t SkUTF16_ToUTF8 (const uint16_t utf16[], int numberOf16BitValues, char utf8[]=NULL)

Define Documentation

#define kMaxBytesInUTF8Sequence   4

Definition at line 56 of file SkUtils.h.

#define sk_memset16 ( dst,
value,
count   )     sk_memset16_portable(dst, value, count)

Definition at line 46 of file SkUtils.h.

#define sk_memset32 ( dst,
value,
count   )     sk_memset32_portable(dst, value, count)

Definition at line 50 of file SkUtils.h.

#define SkUTF16_IsHighSurrogate (  )     (((c) & 0xFC00) == 0xD800)

Definition at line 84 of file SkUtils.h.

#define SkUTF16_IsLowSurrogate (  )     (((c) & 0xFC00) == 0xDC00)

Definition at line 85 of file SkUtils.h.


Function Documentation

void sk_memset16_portable ( uint16_t  dst[],
uint16_t  value,
int  count 
)

Similar to memset(), but it assigns a 16bit value into the buffer.

Parameters:
buffer The memory to have value copied into it
value The 16bit value to be copied into buffer
count The number of times value should be copied into the buffer.
void sk_memset32_portable ( uint32_t  dst[],
uint32_t  value,
int  count 
)

Similar to memset(), but it assigns a 32bit value into the buffer.

Parameters:
buffer The memory to have value copied into it
value The 32bit value to be copied into buffer
count The number of times value should be copied into the buffer.
int SkUTF16_CountUnichars ( const uint16_t  utf16[],
int  numberOf16BitValues 
)
int SkUTF16_CountUnichars ( const uint16_t  utf16[]  ) 
size_t SkUTF16_FromUnichar ( SkUnichar  uni,
uint16_t  utf16[] = NULL 
)
SkUnichar SkUTF16_NextUnichar ( const uint16_t **   ) 
SkUnichar SkUTF16_PrevUnichar ( const uint16_t **   ) 
size_t SkUTF16_ToUTF8 ( const uint16_t  utf16[],
int  numberOf16BitValues,
char  utf8[] = NULL 
)
int SkUTF8_CountUnichars ( const char  utf8[],
size_t  byteLength 
)
int SkUTF8_CountUnichars ( const char  utf8[]  ) 
int SkUTF8_CountUTF8Bytes ( const char  utf8[]  )  [inline]

Definition at line 64 of file SkUtils.h.

size_t SkUTF8_FromUnichar ( SkUnichar  uni,
char  utf8[] = NULL 
)

Return the number of bytes need to convert a unichar into a utf8 sequence. Will be 1..kMaxBytesInUTF8Sequence, or 0 if uni is illegal.

int SkUTF8_LeadByteToCount ( unsigned  c  ) 
SkUnichar SkUTF8_NextUnichar ( const char **   ) 
SkUnichar SkUTF8_PrevUnichar ( const char **   ) 
SkUnichar SkUTF8_ToUnichar ( const char  utf8[]  ) 

Generated on Tue Oct 20 11:03:41 2009 for Skia by  doxygen 1.6.1