gfx/skia/trunk/src/sfnt/SkTTCFHeader.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/sfnt/SkTTCFHeader.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +/*
     1.5 + * Copyright 2013 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#ifndef SkTTCFHeader_DEFINED
    1.12 +#define SkTTCFHeader_DEFINED
    1.13 +
    1.14 +#include "SkOTTableTypes.h"
    1.15 +
    1.16 +#pragma pack(push, 1)
    1.17 +
    1.18 +struct SkTTCFHeader {
    1.19 +    SK_SFNT_ULONG ttcTag;
    1.20 +    static const SK_OT_CHAR TAG0 = 't';
    1.21 +    static const SK_OT_CHAR TAG1 = 't';
    1.22 +    static const SK_OT_CHAR TAG2 = 'c';
    1.23 +    static const SK_OT_CHAR TAG3 = 'f';
    1.24 +    static const SK_OT_ULONG TAG = SkOTTableTAG<SkTTCFHeader>::value;
    1.25 +
    1.26 +    SK_OT_Fixed version;
    1.27 +    static const SK_OT_Fixed version_1 = SkTEndian_SwapBE32(1 << 16);
    1.28 +    static const SK_OT_Fixed version_2 = SkTEndian_SwapBE32(2 << 16);
    1.29 +
    1.30 +    SK_OT_ULONG numOffsets;
    1.31 +    //SK_OT_ULONG offset[numOffsets]
    1.32 +
    1.33 +    struct Version2Ext {
    1.34 +        SK_OT_ULONG dsigType;
    1.35 +        struct dsigType_None {
    1.36 +            static const SK_OT_CHAR TAG0 = 0;
    1.37 +            static const SK_OT_CHAR TAG1 = 0;
    1.38 +            static const SK_OT_CHAR TAG2 = 0;
    1.39 +            static const SK_OT_CHAR TAG3 = 0;
    1.40 +            static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_None>::value;
    1.41 +        };
    1.42 +        struct dsigType_Format1 {
    1.43 +            static const SK_OT_CHAR TAG0 = 'D';
    1.44 +            static const SK_OT_CHAR TAG1 = 'S';
    1.45 +            static const SK_OT_CHAR TAG2 = 'I';
    1.46 +            static const SK_OT_CHAR TAG3 = 'G';
    1.47 +            static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_Format1>::value;
    1.48 +        };
    1.49 +        SK_OT_ULONG dsigLength; //Length of DSIG table (in bytes).
    1.50 +        SK_OT_ULONG dsigOffset; //Offset of DSIG table from the beginning of file (in bytes).
    1.51 +    };// version2ext (if version == version_2)
    1.52 +};
    1.53 +
    1.54 +#pragma pack(pop)
    1.55 +
    1.56 +
    1.57 +SK_COMPILE_ASSERT(sizeof(SkTTCFHeader) == 12, sizeof_SkTTCFHeader_not_12);
    1.58 +
    1.59 +#endif

mercurial