[HarfBuzz] harfbuzz: Branch 'master' - 3 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Dec 4 12:44:49 PST 2012


 NEWS                     |   16 ++++++++++++++++
 configure.ac             |    2 +-
 src/hb-common.cc         |   12 ++----------
 src/hb-object-private.hh |   44 ++++++++++----------------------------------
 4 files changed, 29 insertions(+), 45 deletions(-)

New commits:
commit a52f51b21635c626f6e5ccdba505c4df19bcff2c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 4 15:43:38 2012 -0500

    0.9.8

diff --git a/NEWS b/NEWS
index b233c68..5b0f38a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,19 @@
+Overview of changes leading to 0.9.8
+Tuesday, December 4, 2012
+====================================
+
+
+- Actually implement hb_shape_plan_get_shaper ().
+- Make UCDB data tables const.
+- Lots of internal refactoring in OTLayout tables.
+- Flesh out hb_ot_layout_lookup_collect_glyphs().
+
+New API:
+
+hb_ot_layout_collect_lookups()
+hb_ot_layout_get_size_params()
+
+
 Overview of changes leading to 0.9.7
 Sunday, November 21, 2012
 ====================================
diff --git a/configure.ac b/configure.ac
index 42228cb..08638f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [0.9.7],
+        [0.9.8],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
         [harfbuzz],
         [http://harfbuzz.org/])
commit 7babfe5a7904c26060c5b8441ca1bf23e1444f35
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 4 00:35:54 2012 +0200

    Move object mutext into the user-data array
    
    We are not using it for anything lse it seems.

diff --git a/src/hb-common.cc b/src/hb-common.cc
index 33a514d..9422555 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -363,8 +363,7 @@ bool
 hb_user_data_array_t::set (hb_user_data_key_t *key,
 			   void *              data,
 			   hb_destroy_func_t   destroy,
-			   hb_bool_t           replace,
-			   hb_mutex_t         &lock)
+			   hb_bool_t           replace)
 {
   if (!key)
     return false;
@@ -382,20 +381,13 @@ hb_user_data_array_t::set (hb_user_data_key_t *key,
 }
 
 void *
-hb_user_data_array_t::get (hb_user_data_key_t *key,
-			   hb_mutex_t         &lock)
+hb_user_data_array_t::get (hb_user_data_key_t *key)
 {
   hb_user_data_item_t item = {NULL };
 
   return items.find (key, &item, lock) ? item.data : NULL;
 }
 
-void
-hb_user_data_array_t::finish (hb_mutex_t &lock)
-{
-  items.finish (lock);
-}
-
 
 /* hb_version */
 
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index 0499226..8a9ae34 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -65,7 +65,7 @@ struct hb_reference_count_t
 
 /* user_data */
 
-#define HB_USER_DATA_ARRAY_INIT {HB_LOCKABLE_SET_INIT}
+#define HB_USER_DATA_ARRAY_INIT {HB_MUTEX_INIT, HB_LOCKABLE_SET_INIT}
 struct hb_user_data_array_t
 {
   /* TODO Add tracing. */
@@ -81,20 +81,19 @@ struct hb_user_data_array_t
     void finish (void) { if (destroy) destroy (data); }
   };
 
+  hb_mutex_t lock;
   hb_lockable_set_t<hb_user_data_item_t, hb_mutex_t> items;
 
-  inline void init (void) { items.init (); }
+  inline void init (void) { lock.init (); items.init (); }
 
   HB_INTERNAL bool set (hb_user_data_key_t *key,
 			void *              data,
 			hb_destroy_func_t   destroy,
-			hb_bool_t           replace,
-			hb_mutex_t         &lock);
+			hb_bool_t           replace);
 
-  HB_INTERNAL void *get (hb_user_data_key_t *key,
-			hb_mutex_t          &lock);
+  HB_INTERNAL void *get (hb_user_data_key_t *key);
 
-  HB_INTERNAL void finish (hb_mutex_t &lock);
+  inline void finish (void) { items.finish (lock); lock.finish (); }
 };
 
 
@@ -103,10 +102,9 @@ struct hb_user_data_array_t
 struct hb_object_header_t
 {
   hb_reference_count_t ref_count;
-  hb_mutex_t mutex;
   hb_user_data_array_t user_data;
 
-#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INVALID, HB_MUTEX_INIT, HB_USER_DATA_ARRAY_INIT}
+#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INVALID, HB_USER_DATA_ARRAY_INIT}
 
   static inline void *create (unsigned int size) {
     hb_object_header_t *obj = (hb_object_header_t *) calloc (1, size);
@@ -119,7 +117,6 @@ struct hb_object_header_t
 
   inline void init (void) {
     ref_count.init (1);
-    mutex.init ();
     user_data.init ();
   }
 
@@ -140,8 +137,7 @@ struct hb_object_header_t
       return false;
 
     ref_count.finish (); /* Do this before user_data */
-    user_data.finish (mutex);
-    mutex.finish ();
+    user_data.finish ();
 
     return true;
   }
@@ -153,14 +149,14 @@ struct hb_object_header_t
     if (unlikely (!this || this->is_inert ()))
       return false;
 
-    return user_data.set (key, data, destroy_func, replace, mutex);
+    return user_data.set (key, data, destroy_func, replace);
   }
 
   inline void *get_user_data (hb_user_data_key_t *key) {
     if (unlikely (!this || this->is_inert ()))
       return NULL;
 
-    return user_data.get (key, mutex);
+    return user_data.get (key);
   }
 
   inline void trace (const char *function) const {
commit a1900114770952778563dd6f3bc79334b0ca8df5
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Dec 4 00:29:35 2012 +0200

    Remove unused functions

diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
index c48f242..0499226 100644
--- a/src/hb-object-private.hh
+++ b/src/hb-object-private.hh
@@ -146,14 +146,6 @@ struct hb_object_header_t
     return true;
   }
 
-  inline void lock (void) {
-    mutex.lock ();
-  }
-
-  inline void unlock (void) {
-    mutex.unlock ();
-  }
-
   inline bool set_user_data (hb_user_data_key_t *key,
 			     void *              data,
 			     hb_destroy_func_t   destroy_func,
@@ -219,18 +211,6 @@ static inline bool hb_object_destroy (Type *obj)
   return obj->header.destroy ();
 }
 template <typename Type>
-static inline void hb_object_lock (Type *obj)
-{
-  hb_object_trace (obj, HB_FUNC);
-  return obj->header.lock ();
-}
-template <typename Type>
-static inline void hb_object_unlock (Type *obj)
-{
-  hb_object_trace (obj, HB_FUNC);
-  return obj->header.unlock ();
-}
-template <typename Type>
 static inline bool hb_object_set_user_data (Type               *obj,
 					    hb_user_data_key_t *key,
 					    void *              data,



More information about the HarfBuzz mailing list