[buffer] Merge and rename clear_glyph_flags()
This commit is contained in:
parent
b95d252fab
commit
94d43c008a
|
@ -450,11 +450,10 @@ struct hb_buffer_t
|
|||
}
|
||||
}
|
||||
|
||||
void unsafe_to_break_all () { unsafe_to_break_impl (0, len); }
|
||||
void safe_to_break_all ()
|
||||
void clear_glyph_flags (hb_mask_t mask = 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < len; i++)
|
||||
info[i].mask &= ~HB_GLYPH_FLAG_UNSAFE_TO_BREAK;
|
||||
info[i].mask = (info[i].mask & ~HB_GLYPH_FLAG_DEFINED) | (mask & HB_GLYPH_FLAG_DEFINED);
|
||||
}
|
||||
};
|
||||
DECLARE_NULL_INSTANCE (hb_buffer_t);
|
||||
|
|
|
@ -1213,7 +1213,7 @@ resize_and_retry:
|
|||
}
|
||||
}
|
||||
|
||||
buffer->unsafe_to_break_all ();
|
||||
buffer->clear_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK);
|
||||
|
||||
#undef FAIL
|
||||
|
||||
|
|
|
@ -762,7 +762,7 @@ retry_getglyphs:
|
|||
|
||||
if (isRightToLeft) hb_buffer_reverse (buffer);
|
||||
|
||||
buffer->unsafe_to_break_all ();
|
||||
buffer->clear_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK);
|
||||
|
||||
delete [] clusterMap;
|
||||
delete [] glyphIndices;
|
||||
|
|
|
@ -117,7 +117,7 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
|
|||
if (HB_DIRECTION_IS_BACKWARD (direction))
|
||||
hb_buffer_reverse (buffer);
|
||||
|
||||
buffer->safe_to_break_all ();
|
||||
buffer->clear_glyph_flags ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
|
|||
if (feats) gr_featureval_destroy (feats);
|
||||
gr_seg_destroy (seg);
|
||||
|
||||
buffer->unsafe_to_break_all ();
|
||||
buffer->clear_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -566,7 +566,7 @@ struct AlternateSet
|
|||
{
|
||||
/* Maybe we can do better than unsafe-to-break all; but since we are
|
||||
* changing random state, it would be hard to track that. Good 'nough. */
|
||||
c->buffer->unsafe_to_break_all ();
|
||||
c->buffer->unsafe_to_break (0, c->buffer->len);
|
||||
alt_index = c->random_number () % count + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -878,7 +878,7 @@ retry:
|
|||
if (backward)
|
||||
hb_buffer_reverse (buffer);
|
||||
|
||||
buffer->unsafe_to_break_all ();
|
||||
buffer->clear_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK);
|
||||
|
||||
/* Wow, done! */
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue