diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-14 23:58:28 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-14 23:58:28 +0000 |
commit | 6af38938c1752bf61b8855db1f1524d0e9ed6097 (patch) | |
tree | 06d78158db2546416bbfd6f990f7f5c1264d3fa1 /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc | |
parent | a54d196b0fc4715e3d2dbcfe62cfccea6aae57fe (diff) |
harfbuzz 1.8.8
git-svn-id: svn://tug.org/texlive/trunk@48403 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc index cc1834c4758..0d61d9e1f2a 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-shape-plan.cc @@ -49,11 +49,13 @@ hb_shape_plan_plan (hb_shape_plan_t *shape_plan, #define HB_SHAPER_PLAN(shaper) \ HB_STMT_START { \ - if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face_unsafe)) { \ - HB_SHAPER_DATA (shaper, shape_plan) = \ + if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face_unsafe)) \ + { \ + /* XXX-MT-bug What happened to *ensure*ing this?!!!! */ \ + HB_SHAPER_DATA (shaper, shape_plan).set_relaxed ( \ HB_SHAPER_DATA_CREATE_FUNC (shaper, shape_plan) (shape_plan, \ user_features, num_user_features, \ - coords, num_coords); \ + coords, num_coords)); \ shape_plan->shaper_func = _hb_##shaper##_shape; \ shape_plan->shaper_name = #shaper; \ return; \ @@ -106,10 +108,10 @@ DEFINE_NULL_INSTANCE (hb_shape_plan_t) = 0, /* num_coords */ { -#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, +#define HB_SHAPER_IMPLEMENT(shaper) HB_ATOMIC_PTR_INIT (HB_SHAPER_DATA_INVALID), #include "hb-shaper-list.hh" #undef HB_SHAPER_IMPLEMENT - } + }, }; @@ -339,7 +341,7 @@ hb_shape_plan_execute (hb_shape_plan_t *shape_plan, #define HB_SHAPER_EXECUTE(shaper) \ HB_STMT_START { \ - return HB_SHAPER_DATA (shaper, shape_plan) && \ + return HB_SHAPER_DATA (shaper, shape_plan).get () && \ hb_##shaper##_shaper_font_data_ensure (font) && \ _hb_##shaper##_shape (shape_plan, font, buffer, features, num_features); \ } HB_STMT_END @@ -517,7 +519,7 @@ hb_shape_plan_create_cached2 (hb_face_t *face, retry: - hb_face_t::plan_node_t *cached_plan_nodes = (hb_face_t::plan_node_t *) hb_atomic_ptr_get (&face->shape_plans); + hb_face_t::plan_node_t *cached_plan_nodes = face->shape_plans.get (); /* Don't look for plan in the cache if there were variation coordinates XXX Fix me. */ if (!hb_coords_present (coords, num_coords)) @@ -552,7 +554,8 @@ retry: node->shape_plan = shape_plan; node->next = cached_plan_nodes; - if (!hb_atomic_ptr_cmpexch (&face->shape_plans, cached_plan_nodes, node)) { + if (unlikely (!face->shape_plans.cmpexch (cached_plan_nodes, node))) + { hb_shape_plan_destroy (shape_plan); free (node); goto retry; |