Home | History | Annotate | Download | only in src

Lines Matching refs:shape_plan

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