include/core/SkEndian.h File Reference

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

Go to the source code of this file.

Defines

#define SkEndian_SwapBE16(n)   (n)
#define SkEndian_SwapBE32(n)   (n)
#define SkEndian_SwapLE16(n)   SkEndianSwap16(n)
#define SkEndian_SwapLE32(n)   SkEndianSwap32(n)

Functions

uint16_t SkEndianSwap16 (U16CPU value)
void SkEndianSwap16s (uint16_t array[], int count)
uint32_t SkEndianSwap32 (uint32_t value)
void SkEndianSwap32s (uint32_t array[], int count)

Detailed Description

Macros and helper functions for handling 16 and 32 bit values in big and little endian formats.

Definition in file SkEndian.h.


Define Documentation

#define SkEndian_SwapBE16 (  )     (n)

Definition at line 90 of file SkEndian.h.

#define SkEndian_SwapBE32 (  )     (n)

Definition at line 91 of file SkEndian.h.

#define SkEndian_SwapLE16 (  )     SkEndianSwap16(n)

Definition at line 92 of file SkEndian.h.

#define SkEndian_SwapLE32 (  )     SkEndianSwap32(n)

Definition at line 93 of file SkEndian.h.


Function Documentation

uint16_t SkEndianSwap16 ( U16CPU  value  )  [inline]

Swap the two bytes in the low 16bits of the parameters. e.g. 0x1234 -> 0x3412

Definition at line 39 of file SkEndian.h.

void SkEndianSwap16s ( uint16_t  array[],
int  count 
) [inline]

Vector version of SkEndianSwap16(), which swaps the low two bytes of each value in the array.

Definition at line 48 of file SkEndian.h.

uint32_t SkEndianSwap32 ( uint32_t  value  )  [inline]

Reverse all 4 bytes in a 32bit value. e.g. 0x12345678 -> 0x78563412

Definition at line 62 of file SkEndian.h.

void SkEndianSwap32s ( uint32_t  array[],
int  count 
) [inline]

Vector version of SkEndianSwap16(), which swaps the bytes of each value in the array.

Definition at line 73 of file SkEndian.h.


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