mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1360128 pt 2 - Cherry-pick commit 19e77e01bc13f44138e1d50533327d314dd0a018 from upstream harfbuzz, to avoid incorrect shape-plan caching in harfbuzz with variation fonts. r=jrmuizel
This commit is contained in:
parent
589b1b4dc7
commit
5610a0e1a8
@ -520,15 +520,17 @@ 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);
|
||||
for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next)
|
||||
if (hb_shape_plan_matches (node->shape_plan, &proposal))
|
||||
{
|
||||
DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache");
|
||||
return hb_shape_plan_reference (node->shape_plan);
|
||||
}
|
||||
|
||||
/* Don't look for plan in the cache if there were variation coordinates XXX Fix me. */
|
||||
if (!hb_coords_present (coords, num_coords))
|
||||
for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next)
|
||||
if (hb_shape_plan_matches (node->shape_plan, &proposal))
|
||||
{
|
||||
DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache");
|
||||
return hb_shape_plan_reference (node->shape_plan);
|
||||
}
|
||||
|
||||
/* Not found. */
|
||||
|
||||
hb_shape_plan_t *shape_plan = hb_shape_plan_create2 (face, props,
|
||||
user_features, num_user_features,
|
||||
coords, num_coords,
|
||||
|
Loading…
Reference in New Issue
Block a user