1f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com/* 2f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * Copyright 2012 Google Inc. 3f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * 4f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * Use of this source code is governed by a BSD-style license that can be 5f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * found in the LICENSE file. 6f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com */ 7f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 8f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#ifndef SkOTTable_OS_2_DEFINED 9f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#define SkOTTable_OS_2_DEFINED 10f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 11f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_VA.h" 12f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_V0.h" 13f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_V1.h" 14f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_V2.h" 15f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_V3.h" 16f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTable_OS_2_V4.h" 17f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 18f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#pragma pack(push, 1) 19f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 20ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.comstruct SkOTTableOS2 { 2101a16992cc9297d4985dc80e3177cc7475b9b385bungeman static constexpr SK_OT_CHAR TAG0 = 'O'; 2201a16992cc9297d4985dc80e3177cc7475b9b385bungeman static constexpr SK_OT_CHAR TAG1 = 'S'; 2301a16992cc9297d4985dc80e3177cc7475b9b385bungeman static constexpr SK_OT_CHAR TAG2 = '/'; 2401a16992cc9297d4985dc80e3177cc7475b9b385bungeman static constexpr SK_OT_CHAR TAG3 = '2'; 2501a16992cc9297d4985dc80e3177cc7475b9b385bungeman static constexpr SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableOS2>::value; 26ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com 27ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com union Version { 28a544f29496758de6ed2ebf5a53558574019c9da1bungeman@google.com SK_OT_USHORT version; 29b0a327e9390da5865d4c56db5e5259adc3380d37skia.committer@gmail.com 30ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com //original V0 TT 31ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct VA : SkOTTableOS2_VA { } vA; 32ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct V0 : SkOTTableOS2_V0 { } v0; 33ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct V1 : SkOTTableOS2_V1 { } v1; 34ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct V2 : SkOTTableOS2_V2 { } v2; 35ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com //makes fsType 0-3 exclusive 36ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct V3 : SkOTTableOS2_V3 { } v3; 37ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com //defines fsSelection bits 7-9 38ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com struct V4 : SkOTTableOS2_V4 { } v4; 39ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com } version; 40f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com}; 41f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 42f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#pragma pack(pop) 43f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 44f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 4599fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::VA) == 68, "sizeof_SkOTTableOS2__VA_not_68"); 4699fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::V0) == 78, "sizeof_SkOTTableOS2__V0_not_78"); 4799fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::V1) == 86, "sizeof_SkOTTableOS2__V1_not_86"); 4899fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::V2) == 96, "sizeof_SkOTTableOS2__V2_not_96"); 4999fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::V3) == 96, "sizeof_SkOTTableOS2__V3_not_96"); 5099fe82260633fcf5d92cca38d12ef0937ecca61cbungemanstatic_assert(sizeof(SkOTTableOS2::Version::V4) == 96, "sizeof_SkOTTableOS2__V4_not_96"); 51f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 52f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#endif 53