chromium/third_party/skia/src/sfnt/SkOTTableTypes.h

/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkOTTableTypes_DEFINED
#define SkOTTableTypes_DEFINED

#include "include/core/SkTypes.h"
#include "src/base/SkEndian.h"

//All SK_OT_ prefixed types should be considered as big endian.
SK_OT_BYTE;
#if CHAR_BIT == 8
SK_OT_CHAR; //easier to debug
#else
typedef int8_t SK_OT_CHAR;
#endif
SK_OT_SHORT;
SK_OT_USHORT;
SK_OT_ULONG;
SK_OT_LONG;
//16.16 Signed fixed point representation.
SK_OT_Fixed;
//2.14 Signed fixed point representation.
SK_OT_F2DOT14;
//F units are the units of measurement in em space.
SK_OT_FWORD;
SK_OT_UFWORD;
//Number of seconds since 12:00 midnight, January 1, 1904.
SK_OT_LONGDATETIME;

#define SK_OT_BYTE_BITFIELD

template<typename T> class SkOTTableTAG {};

/** SkOTSetUSHORTBit<N>::value is an SK_OT_USHORT with the Nth BE bit set. */
template <unsigned N> struct SkOTSetUSHORTBit {};

/** SkOTSetULONGBit<N>::value is an SK_OT_ULONG with the Nth BE bit set. */
template <unsigned N> struct SkOTSetULONGBit {};

#endif