|
|
|
@ -1145,19 +1145,7 @@ hb_propagate_flags (hb_buffer_t *buffer) |
|
|
|
|
static void |
|
|
|
|
hb_ot_shape_internal (hb_ot_shape_context_t *c) |
|
|
|
|
{ |
|
|
|
|
c->buffer->deallocate_var_all (); |
|
|
|
|
c->buffer->serial = 0; |
|
|
|
|
c->buffer->scratch_flags = HB_BUFFER_SCRATCH_FLAG_DEFAULT; |
|
|
|
|
if (likely (!hb_unsigned_mul_overflows (c->buffer->len, HB_BUFFER_MAX_LEN_FACTOR))) |
|
|
|
|
{ |
|
|
|
|
c->buffer->max_len = hb_max (c->buffer->len * HB_BUFFER_MAX_LEN_FACTOR, |
|
|
|
|
(unsigned) HB_BUFFER_MAX_LEN_MIN); |
|
|
|
|
} |
|
|
|
|
if (likely (!hb_unsigned_mul_overflows (c->buffer->len, HB_BUFFER_MAX_OPS_FACTOR))) |
|
|
|
|
{ |
|
|
|
|
c->buffer->max_ops = hb_max (c->buffer->len * HB_BUFFER_MAX_OPS_FACTOR, |
|
|
|
|
(unsigned) HB_BUFFER_MAX_OPS_MIN); |
|
|
|
|
} |
|
|
|
|
c->buffer->enter (); |
|
|
|
|
|
|
|
|
|
/* Save the original direction, we use it later. */ |
|
|
|
|
c->target_direction = c->buffer->props.direction; |
|
|
|
@ -1189,10 +1177,7 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c) |
|
|
|
|
|
|
|
|
|
c->buffer->props.direction = c->target_direction; |
|
|
|
|
|
|
|
|
|
c->buffer->max_len = HB_BUFFER_MAX_LEN_DEFAULT; |
|
|
|
|
c->buffer->max_ops = HB_BUFFER_MAX_OPS_DEFAULT; |
|
|
|
|
c->buffer->deallocate_var_all (); |
|
|
|
|
c->buffer->serial = 0; |
|
|
|
|
c->buffer->leave (); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|