[HarfBuzz] harfbuzz: Branch 'master' - 5 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Nov 11 05:17:54 UTC 2018
src/hb-blob.cc | 12 ------------
src/hb-blob.hh | 1 -
src/hb-font.cc | 2 +-
src/hb-shape-plan.cc | 30 +++---------------------------
src/hb-shape-plan.hh | 3 +--
5 files changed, 5 insertions(+), 43 deletions(-)
New commits:
commit 925b7a214f06b83b6f2278052656dabc4ebdd6b7
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 00:17:30 2018 -0500
Comment
diff --git a/src/hb-font.cc b/src/hb-font.cc
index b24995b1..ca710a6f 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -1306,7 +1306,7 @@ DEFINE_NULL_INSTANCE (hb_font_t) =
0, /* num_coords */
nullptr, /* coords */
- const_cast<hb_font_funcs_t *> (&_hb_Null_hb_font_funcs_t), /* klass */
+ const_cast<hb_font_funcs_t *> (&_hb_Null_hb_font_funcs_t),
nullptr, /* user_data */
nullptr, /* destroy */
commit dcb63868333ba8e229fd8756377151440dd9fd23
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 00:16:17 2018 -0500
[shape-plan] Remove use of custom null object
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc
index 644c1b6b..8fcc038f 100644
--- a/src/hb-shape-plan.cc
+++ b/src/hb-shape-plan.cc
@@ -103,30 +103,6 @@ hb_shape_plan_plan (hb_shape_plan_t *shape_plan,
* hb_shape_plan_t
*/
-DEFINE_NULL_INSTANCE (hb_shape_plan_t) =
-{
- HB_OBJECT_HEADER_STATIC,
-
- nullptr, /* face */
- false, /* custom_shaper_list */
- HB_SEGMENT_PROPERTIES_DEFAULT, /* props */
-
- nullptr, /* shaper_func */
- nullptr, /* shaper_name */
-
- nullptr, /* user_features */
- 0, /* num_user_featurs */
-
- nullptr, /* coords */
- 0, /* num_coords */
-
- {
-#define HB_SHAPER_IMPLEMENT(shaper) HB_ATOMIC_PTR_INIT (HB_SHAPER_DATA_INVALID),
-#include "hb-shaper-list.hh"
-#undef HB_SHAPER_IMPLEMENT
- },
-};
-
/**
* hb_shape_plan_create: (Xconstructor)
diff --git a/src/hb-shape-plan.hh b/src/hb-shape-plan.hh
index fea3e10c..891b9957 100644
--- a/src/hb-shape-plan.hh
+++ b/src/hb-shape-plan.hh
@@ -50,7 +50,6 @@ struct hb_shape_plan_t
struct hb_shaper_data_t shaper_data;
};
-DECLARE_NULL_INSTANCE (hb_shape_plan_t);
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS \
, const hb_feature_t *user_features \
commit 109891d49876de4de14a91adefbdf681c2b9acc2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 00:15:08 2018 -0500
[shape-plan] Make null object all zeros
To remove custom null object next..
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc
index f2f21019..644c1b6b 100644
--- a/src/hb-shape-plan.cc
+++ b/src/hb-shape-plan.cc
@@ -107,8 +107,8 @@ DEFINE_NULL_INSTANCE (hb_shape_plan_t) =
{
HB_OBJECT_HEADER_STATIC,
- true, /* default_shaper_list */
nullptr, /* face */
+ false, /* custom_shaper_list */
HB_SEGMENT_PROPERTIES_DEFAULT, /* props */
nullptr, /* shaper_func */
@@ -196,7 +196,7 @@ hb_shape_plan_create2 (hb_face_t *face,
assert (props->direction != HB_DIRECTION_INVALID);
hb_face_make_immutable (face);
- shape_plan->default_shaper_list = !shaper_list;
+ shape_plan->custom_shaper_list = shaper_list;
shape_plan->face_unsafe = face;
shape_plan->props = *props;
shape_plan->num_user_features = num_user_features;
@@ -382,7 +382,7 @@ static unsigned int
hb_shape_plan_hash (const hb_shape_plan_t *shape_plan)
{
return hb_segment_properties_hash (&shape_plan->props) +
- shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func;
+ shape_plan->custom_shaper_list ? (intptr_t) shape_plan->shaper_func : 0;
}
#endif
@@ -436,7 +436,7 @@ hb_shape_plan_matches (const hb_shape_plan_t *shape_plan,
return hb_segment_properties_equal (&shape_plan->props, &proposal->props) &&
hb_shape_plan_user_features_match (shape_plan, proposal) &&
hb_shape_plan_coords_match (shape_plan, proposal) &&
- ((shape_plan->default_shaper_list && !proposal->shaper_list) ||
+ ((!shape_plan->custom_shaper_list && !proposal->shaper_list) ||
(shape_plan->shaper_func == proposal->shaper_func));
}
diff --git a/src/hb-shape-plan.hh b/src/hb-shape-plan.hh
index 403c3ebd..fea3e10c 100644
--- a/src/hb-shape-plan.hh
+++ b/src/hb-shape-plan.hh
@@ -35,8 +35,8 @@ struct hb_shape_plan_t
{
hb_object_header_t header;
- hb_bool_t default_shaper_list;
hb_face_t *face_unsafe; /* We don't carry a reference to face. */
+ bool custom_shaper_list;
hb_segment_properties_t props;
hb_shape_func_t *shaper_func;
commit 34185ff3bc7ece5620145fc05da07c79da950f34
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 00:12:30 2018 -0500
[blob] Use default null object
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index efca833e..26c0d143 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -53,18 +53,6 @@
**/
-DEFINE_NULL_INSTANCE (hb_blob_t) =
-{
- HB_OBJECT_HEADER_STATIC,
-
- nullptr, /* data */
- 0, /* length */
- HB_MEMORY_MODE_DUPLICATE, /* mode */
-
- nullptr, /* user_data */
- nullptr /* destroy */
-};
-
/**
* hb_blob_create: (skip)
* @data: Pointer to blob data.
diff --git a/src/hb-blob.hh b/src/hb-blob.hh
index 08afd562..7007540c 100644
--- a/src/hb-blob.hh
+++ b/src/hb-blob.hh
@@ -77,7 +77,6 @@ struct hb_blob_t
void *user_data;
hb_destroy_func_t destroy;
};
-DECLARE_NULL_INSTANCE (hb_blob_t);
/*
commit 2ee1d9f555fba60342bab63294a6dacca10466de
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Nov 11 00:11:28 2018 -0500
[blob] Change null object memory mode to DUPLICATE
We never rely on that being equal to readonly. Just not being
writable. Maybe not even that given that the object is inert.
In prep for next commit, using default null pool.
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
index 9271200b..efca833e 100644
--- a/src/hb-blob.cc
+++ b/src/hb-blob.cc
@@ -59,7 +59,7 @@ DEFINE_NULL_INSTANCE (hb_blob_t) =
nullptr, /* data */
0, /* length */
- HB_MEMORY_MODE_READONLY, /* mode */
+ HB_MEMORY_MODE_DUPLICATE, /* mode */
nullptr, /* user_data */
nullptr /* destroy */
More information about the HarfBuzz
mailing list