From 9f9bcceca6321d5a5812f878de1de39901349a78 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 28 Jul 2011 17:06:46 -0400 Subject: [PATCH] Register buffer vars in Indic shaper --- src/hb-ot-shape-complex-indic.cc | 6 ++++++ src/hb-ot-shape.cc | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 494368c..e14b894 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -287,6 +287,9 @@ final_reordering (const hb_ot_map_t *map, hb_buffer_t *buffer, void *user_data HB_UNUSED) { + + HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category); + HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position); } void @@ -331,6 +334,9 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer) { unsigned int count = buffer->len; + HB_BUFFER_ALLOCATE_VAR (buffer, indic_category); + HB_BUFFER_ALLOCATE_VAR (buffer, indic_position); + for (unsigned int i = 0; i < count; i++) { unsigned int type = get_indic_categories (buffer->info[i].codepoint); diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 1577214..e40cf1e 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -396,6 +396,8 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c) HB_BUFFER_DEALLOCATE_VAR (c->buffer, general_category); c->buffer->props.direction = c->target_direction; + + c->buffer->deallocate_var_all (); } static void -- 2.7.4