[util/hb-shape] Accept an empty output-format that would skip output
Useful for benchmarking, to avoid buffer serialization overhead (which seems to by far dominate shaping!)
This commit is contained in:
parent
8656408572
commit
9109f1e944
|
@ -48,7 +48,10 @@ struct output_buffer_t
|
||||||
output_format = HB_BUFFER_SERIALIZE_FORMAT_TEXT;
|
output_format = HB_BUFFER_SERIALIZE_FORMAT_TEXT;
|
||||||
else
|
else
|
||||||
output_format = hb_buffer_serialize_format_from_string (options.output_format, -1);
|
output_format = hb_buffer_serialize_format_from_string (options.output_format, -1);
|
||||||
if (!hb_buffer_serialize_format_to_string (output_format))
|
/* An empty "output_format" parameter basically skips output generating.
|
||||||
|
* Useful for benchmarking. */
|
||||||
|
if (*options.output_format &&
|
||||||
|
!hb_buffer_serialize_format_to_string (output_format))
|
||||||
{
|
{
|
||||||
if (options.explicit_output_format)
|
if (options.explicit_output_format)
|
||||||
fail (false, "Unknown output format `%s'; supported formats are: %s",
|
fail (false, "Unknown output format `%s'; supported formats are: %s",
|
||||||
|
|
Loading…
Reference in New Issue