Lines Matching refs:shape_plan
46 hb_shape_plan_plan (hb_shape_plan_t *shape_plan, in hb_shape_plan_plan() argument
51 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, in hb_shape_plan_plan()
60 if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face_unsafe)) { \ in hb_shape_plan_plan()
61 HB_SHAPER_DATA (shaper, shape_plan) = \ in hb_shape_plan_plan()
62 … HB_SHAPER_DATA_CREATE_FUNC (shaper, shape_plan) (shape_plan, user_features, num_user_features); \ in hb_shape_plan_plan()
63 shape_plan->shaper_func = _hb_##shaper##_shape; \ in hb_shape_plan_plan()
64 shape_plan->shaper_name = #shaper; \ in hb_shape_plan_plan()
124 hb_shape_plan_t *shape_plan; in hb_shape_plan_create() local
133 if (!(shape_plan = hb_object_create<hb_shape_plan_t> ())) { in hb_shape_plan_create()
141 shape_plan->default_shaper_list = shaper_list == NULL; in hb_shape_plan_create()
142 shape_plan->face_unsafe = face; in hb_shape_plan_create()
143 shape_plan->props = *props; in hb_shape_plan_create()
144 shape_plan->num_user_features = num_user_features; in hb_shape_plan_create()
145 shape_plan->user_features = features; in hb_shape_plan_create()
149 hb_shape_plan_plan (shape_plan, user_features, num_user_features, shaper_list); in hb_shape_plan_create()
151 return shape_plan; in hb_shape_plan_create()
200 hb_shape_plan_reference (hb_shape_plan_t *shape_plan) in hb_shape_plan_reference() argument
202 return hb_object_reference (shape_plan); in hb_shape_plan_reference()
214 hb_shape_plan_destroy (hb_shape_plan_t *shape_plan) in hb_shape_plan_destroy() argument
216 if (!hb_object_destroy (shape_plan)) return; in hb_shape_plan_destroy()
218 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, shape_plan); in hb_shape_plan_destroy()
222 free (shape_plan->user_features); in hb_shape_plan_destroy()
224 free (shape_plan); in hb_shape_plan_destroy()
242 hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan, in hb_shape_plan_set_user_data() argument
248 return hb_object_set_user_data (shape_plan, key, data, destroy, replace); in hb_shape_plan_set_user_data()
263 hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan, in hb_shape_plan_get_user_data() argument
266 return hb_object_get_user_data (shape_plan, key); in hb_shape_plan_get_user_data()
285 hb_shape_plan_execute (hb_shape_plan_t *shape_plan, in hb_shape_plan_execute() argument
291 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, in hb_shape_plan_execute()
294 shape_plan->shaper_func); in hb_shape_plan_execute()
296 if (unlikely (hb_object_is_inert (shape_plan) || in hb_shape_plan_execute()
301 assert (shape_plan->face_unsafe == font->face); in hb_shape_plan_execute()
302 assert (hb_segment_properties_equal (&shape_plan->props, &buffer->props)); in hb_shape_plan_execute()
306 return HB_SHAPER_DATA (shaper, shape_plan) && \ in hb_shape_plan_execute()
308 _hb_##shaper##_shape (shape_plan, font, buffer, features, num_features); \ in hb_shape_plan_execute()
314 else if (shape_plan->shaper_func == _hb_##shaper##_shape) \ in hb_shape_plan_execute()
331 hb_shape_plan_hash (const hb_shape_plan_t *shape_plan)
333 return hb_segment_properties_hash (&shape_plan->props) +
334 shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func;
353 hb_shape_plan_user_features_match (const hb_shape_plan_t *shape_plan, in hb_shape_plan_user_features_match() argument
356 if (proposal->num_user_features != shape_plan->num_user_features) return false; in hb_shape_plan_user_features_match()
358 if (proposal->user_features[i].tag != shape_plan->user_features[i].tag || in hb_shape_plan_user_features_match()
359 proposal->user_features[i].value != shape_plan->user_features[i].value || in hb_shape_plan_user_features_match()
360 proposal->user_features[i].start != shape_plan->user_features[i].start || in hb_shape_plan_user_features_match()
361 proposal->user_features[i].end != shape_plan->user_features[i].end) return false; in hb_shape_plan_user_features_match()
366 hb_shape_plan_matches (const hb_shape_plan_t *shape_plan, in hb_shape_plan_matches() argument
369 return hb_segment_properties_equal (&shape_plan->props, &proposal->props) && in hb_shape_plan_matches()
370 hb_shape_plan_user_features_match (shape_plan, proposal) && in hb_shape_plan_matches()
371 ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) || in hb_shape_plan_matches()
372 (shape_plan->shaper_func == proposal->shaper_func)); in hb_shape_plan_matches()
446 if (hb_shape_plan_matches (node->shape_plan, &proposal)) in hb_shape_plan_create_cached()
448 DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache"); in hb_shape_plan_create_cached()
449 return hb_shape_plan_reference (node->shape_plan); in hb_shape_plan_create_cached()
454 …hb_shape_plan_t *shape_plan = hb_shape_plan_create (face, props, user_features, num_user_features,… in hb_shape_plan_create_cached() local
459 return shape_plan; in hb_shape_plan_create_cached()
463 return shape_plan; in hb_shape_plan_create_cached()
465 node->shape_plan = shape_plan; in hb_shape_plan_create_cached()
469 hb_shape_plan_destroy (shape_plan); in hb_shape_plan_create_cached()
473 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "inserted into cache"); in hb_shape_plan_create_cached()
475 return hb_shape_plan_reference (shape_plan); in hb_shape_plan_create_cached()
489 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan) in hb_shape_plan_get_shaper() argument
491 return shape_plan->shaper_name; in hb_shape_plan_get_shaper()