< prev index next >

src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-layout-common-private.hh

Print this page

        

*** 27,36 **** --- 27,38 ---- */ #ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH #define HB_OT_LAYOUT_COMMON_PRIVATE_HH + #include "hb-private.hh" + #include "hb-debug.hh" #include "hb-ot-layout-private.hh" #include "hb-open-type-private.hh" #include "hb-set-private.hh"
*** 43,58 **** namespace OT { - #define TRACE_DISPATCH(this, format) \ - hb_auto_trace_t<context_t::max_debug_depth, typename context_t::return_t> trace \ - (&c->debug_depth, c->get_name (), this, HB_FUNC, \ - "format %d", (int) format); - - #define NOT_COVERED ((unsigned int) -1) /* --- 45,54 ----
*** 212,222 **** return Index::NOT_FOUND_INDEX; return reqFeatureIndex;; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<LangSys>::sanitize_closure_t * = NULL) const { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && featureIndex.sanitize (c)); } --- 208,218 ---- return Index::NOT_FOUND_INDEX; return reqFeatureIndex;; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<LangSys>::sanitize_closure_t * = nullptr) const { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && featureIndex.sanitize (c)); }
*** 252,262 **** inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; } inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<Script>::sanitize_closure_t * = NULL) const { TRACE_SANITIZE (this); return_trace (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this)); } --- 248,258 ---- inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; } inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<Script>::sanitize_closure_t * = nullptr) const { TRACE_SANITIZE (this); return_trace (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this)); }
*** 433,453 **** USHORT format; /* Format number is set to 0. */ USHORT featUILableNameID; /* The ‘name’ table name ID that * specifies a string (or strings, * for multiple languages) for a * user-interface label for this ! * feature. (May be NULL.) */ USHORT featUITooltipTextNameID;/* The ‘name’ table name ID that * specifies a string (or strings, * for multiple languages) that an * application can use for tooltip * text for this feature. (May be ! * NULL.) */ USHORT sampleTextNameID; /* The ‘name’ table name ID that * specifies sample text that * illustrates the effect of this ! * feature. (May be NULL.) */ USHORT numNamedParameters; /* Number of named parameters. (May * be zero.) */ USHORT firstParamUILabelNameID;/* The first ‘name’ table name ID * used to specify strings for * user-interface labels for the --- 429,449 ---- USHORT format; /* Format number is set to 0. */ USHORT featUILableNameID; /* The ‘name’ table name ID that * specifies a string (or strings, * for multiple languages) for a * user-interface label for this ! * feature. (May be nullptr.) */ USHORT featUITooltipTextNameID;/* The ‘name’ table name ID that * specifies a string (or strings, * for multiple languages) that an * application can use for tooltip * text for this feature. (May be ! * nullptr.) */ USHORT sampleTextNameID; /* The ‘name’ table name ID that * specifies sample text that * illustrates the effect of this ! * feature. (May be nullptr.) */ USHORT numNamedParameters; /* Number of named parameters. (May * be zero.) */ USHORT firstParamUILabelNameID;/* The first ‘name’ table name ID * used to specify strings for * user-interface labels for the
*** 505,515 **** inline const FeatureParams &get_feature_params (void) const { return this+featureParams; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<Feature>::sanitize_closure_t *closure = NULL) const { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && lookupIndex.sanitize (c)))) return_trace (false); --- 501,511 ---- inline const FeatureParams &get_feature_params (void) const { return this+featureParams; } inline bool sanitize (hb_sanitize_context_t *c, ! const Record<Feature>::sanitize_closure_t *closure = nullptr) const { TRACE_SANITIZE (this); if (unlikely (!(c->check_struct (this) && lookupIndex.sanitize (c)))) return_trace (false);
*** 688,698 **** private: inline unsigned int get_coverage (hb_codepoint_t glyph_id) const { int i = glyphArray.bsearch (glyph_id); ! ASSERT_STATIC (((unsigned int) -1) == NOT_COVERED); return i; } inline bool serialize (hb_serialize_context_t *c, Supplier<GlyphID> &glyphs, --- 684,694 ---- private: inline unsigned int get_coverage (hb_codepoint_t glyph_id) const { int i = glyphArray.bsearch (glyph_id); ! static_assert ((((unsigned int) -1) == NOT_COVERED), ""); return i; } inline bool serialize (hb_serialize_context_t *c, Supplier<GlyphID> &glyphs,
*** 939,949 **** default: break; } } struct Iter { ! Iter (void) : format (0) {}; inline void init (const Coverage &c_) { format = c_.u.format; switch (format) { case 1: u.format1.init (c_.u.format1); return; case 2: u.format2.init (c_.u.format2); return; --- 935,945 ---- default: break; } } struct Iter { ! Iter (void) : format (0), u () {}; inline void init (const Coverage &c_) { format = c_.u.format; switch (format) { case 1: u.format1.init (c_.u.format1); return; case 2: u.format2.init (c_.u.format2); return;
*** 980,991 **** } private: unsigned int format; union { CoverageFormat1::Iter format1; - CoverageFormat2::Iter format2; } u; }; protected: union { --- 976,987 ---- } private: unsigned int format; union { + CoverageFormat2::Iter format2; /* Put this one first since it's larger; helps shut up compiler. */ CoverageFormat1::Iter format1; } u; }; protected: union {
*** 1321,1330 **** --- 1317,1334 ---- return (this+dataSets[outer]).get_delta (inner, coords, coord_count, this+regions); } + inline float get_delta (unsigned int index, + int *coords, unsigned int coord_count) const + { + unsigned int outer = index >> 16; + unsigned int inner = index & 0xFFFF; + return get_delta (outer, inner, coords, coord_count); + } + inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && format == 1 &&
*** 1332,1342 **** dataSets.sanitize (c, this)); } protected: USHORT format; ! OffsetTo<VarRegionList, ULONG> regions; OffsetArrayOf<VarData, ULONG> dataSets; public: DEFINE_SIZE_ARRAY (8, dataSets); }; --- 1336,1346 ---- dataSets.sanitize (c, this)); } protected: USHORT format; ! LOffsetTo<VarRegionList> regions; OffsetArrayOf<VarData, ULONG> dataSets; public: DEFINE_SIZE_ARRAY (8, dataSets); };
*** 1432,1442 **** return_trace (c->check_struct (this) && feature.sanitize (c, base)); } protected: USHORT featureIndex; ! OffsetTo<Feature, ULONG> feature; public: DEFINE_SIZE_STATIC (6); }; struct FeatureTableSubstitution --- 1436,1446 ---- return_trace (c->check_struct (this) && feature.sanitize (c, base)); } protected: USHORT featureIndex; ! LOffsetTo<Feature> feature; public: DEFINE_SIZE_STATIC (6); }; struct FeatureTableSubstitution
*** 1448,1458 **** { const FeatureTableSubstitutionRecord &record = substitutions.array[i]; if (record.featureIndex == feature_index) return &(this+record.feature); } ! return NULL; } inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); --- 1452,1462 ---- { const FeatureTableSubstitutionRecord &record = substitutions.array[i]; if (record.featureIndex == feature_index) return &(this+record.feature); } ! return nullptr; } inline bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this);
*** 1479,1491 **** return_trace (conditions.sanitize (c, base) && substitutions.sanitize (c, base)); } protected: ! OffsetTo<ConditionSet, ULONG> conditions; ! OffsetTo<FeatureTableSubstitution, ULONG> substitutions; public: DEFINE_SIZE_STATIC (8); }; --- 1483,1495 ---- return_trace (conditions.sanitize (c, base) && substitutions.sanitize (c, base)); } protected: ! LOffsetTo<ConditionSet> conditions; ! LOffsetTo<FeatureTableSubstitution> substitutions; public: DEFINE_SIZE_STATIC (8); };
*** 1525,1535 **** varRecords.sanitize (c, this)); } protected: FixedVersion<> version; /* Version--0x00010000u */ ! ArrayOf<FeatureVariationRecord, ULONG> varRecords; public: DEFINE_SIZE_ARRAY (8, varRecords); }; --- 1529,1539 ---- varRecords.sanitize (c, this)); } protected: FixedVersion<> version; /* Version--0x00010000u */ ! LArrayOf<FeatureVariationRecord> varRecords; public: DEFINE_SIZE_ARRAY (8, varRecords); };
< prev index next >