diff --git a/src/hb-face.hh b/src/hb-face.hh index baa1a2e57..77c243721 100644 --- a/src/hb-face.hh +++ b/src/hb-face.hh @@ -71,10 +71,6 @@ struct hb_face_t }; #ifndef HB_NO_SHAPER hb_atomic_t shape_plans; - /* One-entry cache of the last plan looked up, so repeated shaping with the - * same key hits without walking the list. Nodes are never freed before the - * face, so a cached pointer stays valid. */ - hb_atomic_t last_shape_plan; #endif hb_blob_t *reference_table (hb_tag_t tag) const diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index e6a79f9b2..8f5287918 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -567,18 +567,10 @@ retry: shaper_list)) return hb_shape_plan_get_empty (); - hb_face_t::plan_node_t *cached = face->last_shape_plan.get_acquire (); - if (cached && cached->shape_plan->key.equal (&key)) - { - DEBUG_MSG_FUNC (SHAPE_PLAN, cached->shape_plan, "fulfilled from last-plan cache"); - return hb_shape_plan_reference (cached->shape_plan); - } - for (hb_face_t::plan_node_t *node = cached_plan_nodes; node; node = node->next) if (node->shape_plan->key.equal (&key)) { DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache"); - face->last_shape_plan.set_release (node); return hb_shape_plan_reference (node->shape_plan); } } @@ -605,7 +597,6 @@ retry: goto retry; } DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "inserted into cache"); - face->last_shape_plan.set_release (node); return hb_shape_plan_reference (shape_plan); }