[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri May 28 17:54:53 PDT 2010


 src/hb-ot-shape.cc |   23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

New commits:
commit f062ec6bb24b1c21d37b12adc7e944a5fe53526a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri May 28 20:54:43 2010 -0400

    Further simplify mask allocator

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 87cdf47..5403798 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -133,15 +133,7 @@ struct hb_mask_allocator_t {
     }
   };
 
-  hb_mask_allocator_t (hb_face_t *face,
-		       hb_tag_t table_tag,
-		       unsigned int script_index,
-		       unsigned int language_index) :
-    face (face),
-    table_tag (table_tag),
-    script_index (script_index),
-    language_index (language_index),
-    count (0) {}
+  hb_mask_allocator_t (void) : count (0) {}
 
   void add_feature (hb_tag_t tag,
 		    unsigned int value,
@@ -153,7 +145,10 @@ struct hb_mask_allocator_t {
     info->global = global;
   }
 
-  void compile (void)
+  void compile (hb_face_t *face,
+		hb_tag_t table_tag,
+		unsigned int script_index,
+		unsigned int language_index)
   {
     global_mask = 0;
     next_bit = MASK_BITS_USED;
@@ -227,10 +222,6 @@ struct hb_mask_allocator_t {
 
 
   private:
-  hb_face_t *face;
-  hb_tag_t table_tag;
-  unsigned int script_index;
-  unsigned int language_index;
 
   unsigned int count;
   feature_info_t infos[MAX_FEATURES];
@@ -267,7 +258,7 @@ setup_lookups (hb_face_t    *face,
     add_feature (face, table_tag, feature_index, 1, lookups, num_lookups, room_lookups);
 
 
-  hb_mask_allocator_t allocator (face, table_tag, script_index, language_index);
+  hb_mask_allocator_t allocator;
 
   switch (original_direction) {
     case HB_DIRECTION_LTR:
@@ -297,7 +288,7 @@ setup_lookups (hb_face_t    *face,
 
 
   /* Compile features */
-  allocator.compile ();
+  allocator.compile (face, table_tag, script_index, language_index);
 
 
   /* Gather lookup indices for features and set buffer masks at the same time */



More information about the HarfBuzz mailing list