Home | History | Annotate | Download | only in src

Lines Matching refs:shape_plan

36 hb_shape_plan_plan (hb_shape_plan_t    *shape_plan,
43 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan,
53 if (hb_##shaper##_shaper_face_data_ensure (shape_plan->face_unsafe)) { \
54 HB_SHAPER_DATA (shaper, shape_plan) = \
55 HB_SHAPER_DATA_CREATE_FUNC (shaper, shape_plan) (shape_plan, \
58 shape_plan->shaper_func = _hb_##shaper##_shape; \
59 shape_plan->shaper_name = #shaper; \
128 DEBUG_MSG_FUNC (SHAPE_PLAN, nullptr,
135 hb_shape_plan_t *shape_plan;
150 if (!(shape_plan = hb_object_create<hb_shape_plan_t> ()))
160 shape_plan->default_shaper_list = !shaper_list;
161 shape_plan->face_unsafe = face;
162 shape_plan->props = *props;
163 shape_plan->num_user_features = num_user_features;
164 shape_plan->user_features = features;
167 shape_plan->num_coords = num_coords;
168 shape_plan->coords = coords;
172 hb_shape_plan_plan (shape_plan,
177 return shape_plan;
220 * @shape_plan: a shape plan.
229 hb_shape_plan_reference (hb_shape_plan_t *shape_plan)
231 return hb_object_reference (shape_plan);
236 * @shape_plan: a shape plan.
243 hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
245 if (!hb_object_destroy (shape_plan)) return;
247 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, shape_plan);
251 free (shape_plan->user_features);
252 free (shape_plan->coords);
254 free (shape_plan);
259 * @shape_plan: a shape plan.
272 hb_shape_plan_set_user_data (hb_shape_plan_t *shape_plan,
278 return hb_object_set_user_data (shape_plan, key, data, destroy, replace);
283 * @shape_plan: a shape plan.
293 hb_shape_plan_get_user_data (hb_shape_plan_t *shape_plan,
296 return hb_object_get_user_data (shape_plan, key);
302 * @shape_plan: a shape plan.
315 hb_shape_plan_execute (hb_shape_plan_t *shape_plan,
321 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan,
324 shape_plan->shaper_func,
325 shape_plan->shaper_name);
333 if (unlikely (hb_object_is_inert (shape_plan)))
336 assert (shape_plan->face_unsafe == font->face);
337 assert (hb_segment_properties_equal (&shape_plan->props, &buffer->props));
341 return HB_SHAPER_DATA (shaper, shape_plan) && \
343 _hb_##shaper##_shape (shape_plan, font, buffer, features, num_features); \
349 else if (shape_plan->shaper_func == _hb_##shaper##_shape) \
366 hb_shape_plan_hash (const hb_shape_plan_t *shape_plan)
368 return hb_segment_properties_hash (&shape_plan->props) +
369 shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func;
390 hb_shape_plan_user_features_match (const hb_shape_plan_t *shape_plan,
393 if (proposal->num_user_features != shape_plan->num_user_features)
396 if (proposal->user_features[i].tag != shape_plan->user_features[i].tag ||
397 proposal->user_features[i].value != shape_plan->user_features[i].value ||
398 proposal->user_features[i].start != shape_plan->user_features[i].start ||
399 proposal->user_features[i].end != shape_plan->user_features[i].end)
405 hb_shape_plan_coords_match (const hb_shape_plan_t *shape_plan,
408 if (proposal->num_coords != shape_plan->num_coords)
411 if (proposal->coords[i] != shape_plan->coords[i])
417 hb_shape_plan_matches (const hb_shape_plan_t *shape_plan,
420 return hb_segment_properties_equal (&shape_plan->props, &proposal->props) &&
421 hb_shape_plan_user_features_match (shape_plan, proposal) &&
422 hb_shape_plan_coords_match (shape_plan, proposal) &&
423 ((shape_plan->default_shaper_list && !proposal->shaper_list) ||
424 (shape_plan->shaper_func == proposal->shaper_func));
483 DEBUG_MSG_FUNC (SHAPE_PLAN, nullptr,
524 if (hb_shape_plan_matches (node->shape_plan, &proposal))
526 DEBUG_MSG_FUNC (SHAPE_PLAN, node->shape_plan, "fulfilled from cache");
527 return hb_shape_plan_reference (node->shape_plan);
531 hb_shape_plan_t *shape_plan = hb_shape_plan_create2 (face, props,
538 return shape_plan;
542 return shape_plan;
545 return shape_plan;
549 return shape_plan;
551 node->shape_plan = shape_plan;
555 hb_shape_plan_destroy (shape_plan);
559 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "inserted into cache");
561 return hb_shape_plan_reference (shape_plan);
566 * @shape_plan: a shape plan.
575 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan)
577 return shape_plan->shaper_name;