summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-buffer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-buffer.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb-buffer.hh17
1 files changed, 11 insertions, 6 deletions
diff --git a/thirdparty/harfbuzz/src/hb-buffer.hh b/thirdparty/harfbuzz/src/hb-buffer.hh
index 8b432b5f96..8635ebd35f 100644
--- a/thirdparty/harfbuzz/src/hb-buffer.hh
+++ b/thirdparty/harfbuzz/src/hb-buffer.hh
@@ -107,7 +107,7 @@ struct hb_buffer_t
unsigned int idx; /* Cursor into ->info and ->pos arrays */
unsigned int len; /* Length of ->info and ->pos arrays */
- unsigned int out_len; /* Length of ->out array if have_output */
+ unsigned int out_len; /* Length of ->out_info array if have_output */
unsigned int allocated; /* Length of allocated arrays */
hb_glyph_info_t *info;
@@ -128,6 +128,9 @@ struct hb_buffer_t
hb_buffer_message_func_t message_func;
void *message_data;
hb_destroy_func_t message_destroy;
+ unsigned message_depth; /* How deeply are we inside a message callback? */
+#else
+ static constexpr unsigned message_depth = 0u;
#endif
/* Internal debugging. */
@@ -186,13 +189,10 @@ struct hb_buffer_t
hb_glyph_info_t &prev () { return out_info[out_len ? out_len - 1 : 0]; }
hb_glyph_info_t prev () const { return out_info[out_len ? out_len - 1 : 0]; }
- HB_NODISCARD bool has_separate_output () const { return info != out_info; }
-
-
HB_INTERNAL void reset ();
HB_INTERNAL void clear ();
- unsigned int backtrack_len () const { return have_output? out_len : idx; }
+ unsigned int backtrack_len () const { return have_output ? out_len : idx; }
unsigned int lookahead_len () const { return len - idx; }
unsigned int next_serial () { return serial++; }
@@ -206,7 +206,6 @@ struct hb_buffer_t
HB_INTERNAL void guess_segment_properties ();
HB_INTERNAL void swap_buffers ();
- HB_INTERNAL void remove_output ();
HB_INTERNAL void clear_output ();
HB_INTERNAL void clear_positions ();
@@ -400,10 +399,16 @@ struct hb_buffer_t
#else
if (!messaging ())
return true;
+
+ message_depth++;
+
va_list ap;
va_start (ap, fmt);
bool ret = message_impl (font, fmt, ap);
va_end (ap);
+
+ message_depth--;
+
return ret;
#endif
}