[ot-layout] Simplify some access
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
index 5847953..ea5f1c0 100644
--- a/src/hb-ot-layout-gdef-table.hh
+++ b/src/hb-ot-layout-gdef-table.hh
@@ -410,7 +410,7 @@
struct accelerator_t
{
- HB_INTERNAL inline void init (hb_face_t *face);
+ HB_INTERNAL void init (hb_face_t *face);
inline void fini (void)
{
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 399ede4..743a979 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1736,18 +1736,21 @@
}
+struct GPOS_accelerator_t : GPOS::accelerator_t {};
+
+
/* Out-of-class implementation for methods recursing */
template <typename context_t>
/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const PosLookup &l = _get_gpos_relaxed (c->face)->get_lookup (lookup_index);
+ const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const PosLookup &l = _get_gpos_relaxed (c->face).get_lookup (lookup_index);
+ const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
@@ -1758,8 +1761,6 @@
return ret;
}
-struct GPOS_accelerator_t : GPOS::accelerator_t {};
-
} /* namespace OT */
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index d24ea59..cef6421 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -1487,6 +1487,9 @@
};
+struct GSUB_accelerator_t : GSUB::accelerator_t {};
+
+
/* Out-of-class implementation for methods recursing */
/*static*/ inline bool ExtensionSubst::is_reverse (void) const
@@ -1500,13 +1503,13 @@
template <typename context_t>
/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const SubstLookup &l = _get_gsub_relaxed (c->face).get_lookup (lookup_index);
+ const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const SubstLookup &l = _get_gsub_relaxed (c->face).get_lookup (lookup_index);
+ const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
@@ -1517,8 +1520,6 @@
return ret;
}
-struct GSUB_accelerator_t : GSUB::accelerator_t {};
-
} /* namespace OT */
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 0d9eeae..eccbcf4 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -491,7 +491,7 @@
iter_input (), iter_context (),
font (font_), face (font->face), buffer (buffer_),
recurse_func (nullptr),
- gdef (_get_gdef (face)),
+ gdef (*face->table.GDEF->table),
var_store (gdef.get_var_store ()),
direction (buffer_->props.direction),
lookup_mask (1),
diff --git a/src/hb-ot-layout.hh b/src/hb-ot-layout.hh
index b29f87c..437ae47 100644
--- a/src/hb-ot-layout.hh
+++ b/src/hb-ot-layout.hh
@@ -38,19 +38,9 @@
#include "hb-set-digest.hh"
-namespace OT
-{
- struct GDEF;
- struct GSUB;
- struct GPOS;
-}
-
-HB_INTERNAL const OT::GDEF& _get_gdef (hb_face_t *face);
-HB_INTERNAL const OT::GSUB& _get_gsub_relaxed (hb_face_t *face);
-HB_INTERNAL const OT::GPOS& _get_gpos_relaxed (hb_face_t *face);
-
struct hb_ot_shape_plan_t;
+
/*
* kern
*/