Move more code
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 07744ae..a11d5dc 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -2612,6 +2612,23 @@
* GSUB/GPOS Common
*/
+struct hb_ot_layout_lookup_accelerator_t
+{
+ template <typename TLookup>
+ inline void init (const TLookup &lookup)
+ {
+ digest.init ();
+ lookup.add_coverage (&digest);
+ }
+ inline void fini (void) {}
+
+ inline bool may_have (hb_codepoint_t g) const
+ { return digest.may_have (g); }
+
+ private:
+ hb_set_digest_t digest;
+};
+
struct GSUBGPOS
{
inline bool has_data (void) const { return version.to_int () != 0; }
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index fc83873..572e4cb 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -1094,7 +1094,7 @@
accels (hb_ot_face_data (face)->GSUB->accels) {}
const OT::GSUB &table;
- const hb_ot_layout_lookup_accelerator_t *accels;
+ const OT::hb_ot_layout_lookup_accelerator_t *accels;
};
struct GPOSProxy
@@ -1108,13 +1108,13 @@
accels (hb_ot_face_data (face)->GPOS->accels) {}
const OT::GPOS &table;
- const hb_ot_layout_lookup_accelerator_t *accels;
+ const OT::hb_ot_layout_lookup_accelerator_t *accels;
};
static inline bool
apply_forward (OT::hb_ot_apply_context_t *c,
- const hb_ot_layout_lookup_accelerator_t &accel,
+ const OT::hb_ot_layout_lookup_accelerator_t &accel,
const OT::hb_get_subtables_context_t::array_t &subtables)
{
bool ret = false;
@@ -1144,7 +1144,7 @@
static inline bool
apply_backward (OT::hb_ot_apply_context_t *c,
- const hb_ot_layout_lookup_accelerator_t &accel,
+ const OT::hb_ot_layout_lookup_accelerator_t &accel,
const OT::hb_get_subtables_context_t::array_t &subtables)
{
bool ret = false;
@@ -1174,7 +1174,7 @@
static inline void
apply_string (OT::hb_ot_apply_context_t *c,
const typename Proxy::Lookup &lookup,
- const hb_ot_layout_lookup_accelerator_t &accel)
+ const OT::hb_ot_layout_lookup_accelerator_t &accel)
{
hb_buffer_t *buffer = c->buffer;
@@ -1270,7 +1270,7 @@
void
hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
const OT::SubstLookup &lookup,
- const hb_ot_layout_lookup_accelerator_t &accel)
+ const OT::hb_ot_layout_lookup_accelerator_t &accel)
{
apply_string<GSUBProxy> (c, lookup, accel);
}
diff --git a/src/hb-ot-layout.hh b/src/hb-ot-layout.hh
index f5ffe31..64b3d74 100644
--- a/src/hb-ot-layout.hh
+++ b/src/hb-ot-layout.hh
@@ -112,32 +112,16 @@
hb_buffer_t *buffer);
-struct hb_ot_layout_lookup_accelerator_t
-{
- template <typename TLookup>
- inline void init (const TLookup &lookup)
- {
- digest.init ();
- lookup.add_coverage (&digest);
- }
- inline void fini (void) {}
-
- inline bool may_have (hb_codepoint_t g) const
- { return digest.may_have (g); }
-
- private:
- hb_set_digest_t digest;
-};
-
namespace OT {
struct hb_ot_apply_context_t;
struct SubstLookup;
+ struct hb_ot_layout_lookup_accelerator_t;
}
HB_INTERNAL void
hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
const OT::SubstLookup &lookup,
- const hb_ot_layout_lookup_accelerator_t &accel);
+ const OT::hb_ot_layout_lookup_accelerator_t &accel);
/* Should be called before all the position_lookup's are done. */
diff --git a/src/hb-ot-shape-complex-arabic-fallback.hh b/src/hb-ot-shape-complex-arabic-fallback.hh
index 0ef60f6..2aa0367 100644
--- a/src/hb-ot-shape-complex-arabic-fallback.hh
+++ b/src/hb-ot-shape-complex-arabic-fallback.hh
@@ -201,7 +201,7 @@
hb_mask_t mask_array[ARABIC_FALLBACK_MAX_LOOKUPS];
OT::SubstLookup *lookup_array[ARABIC_FALLBACK_MAX_LOOKUPS];
- hb_ot_layout_lookup_accelerator_t accel_array[ARABIC_FALLBACK_MAX_LOOKUPS];
+ OT::hb_ot_layout_lookup_accelerator_t accel_array[ARABIC_FALLBACK_MAX_LOOKUPS];
};
#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(HB_NO_WIN1256)