summaryrefslogtreecommitdiffstats
path: root/libass/ass_shaper.c
diff options
context:
space:
mode:
authorDr.Smile <vabnick@gmail.com>2020-12-13 17:23:26 +0300
committerDr.Smile <vabnick@gmail.com>2021-02-22 18:44:54 +0300
commit82b225b3d6653091d028b39d561d185ed76a7be5 (patch)
tree7a41f473b4b5242919e3a3d8414fa17373132f8a /libass/ass_shaper.c
parent05cde3b5b686e41f96e6b5b1a731617f220aedda (diff)
downloadlibass-82b225b3d6653091d028b39d561d185ed76a7be5.tar.bz2
libass-82b225b3d6653091d028b39d561d185ed76a7be5.tar.xz
parsing: use string references for font family and drawing text
That eliminates most uses of strdup() in the rendering process.
Diffstat (limited to 'libass/ass_shaper.c')
-rw-r--r--libass/ass_shaper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c
index 41392c6..4665e7a 100644
--- a/libass/ass_shaper.c
+++ b/libass/ass_shaper.c
@@ -665,7 +665,7 @@ static bool shape_harfbuzz(ASS_Shaper *shaper, GlyphInfo *glyphs, size_t len)
glyphs[i].skip = true;
for (i = 0; i < len; i++) {
- if (glyphs[i].drawing_text) {
+ if (glyphs[i].drawing_text.str) {
glyphs[i].skip = false;
continue;
}
@@ -805,7 +805,7 @@ void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv,
// find appropriate fonts for the shape runs
for (i = 0; i < len; i++) {
GlyphInfo *info = glyphs + i;
- if (!info->drawing_text) {
+ if (!info->drawing_text.str) {
// set size and get glyph index
ass_font_get_index(render_priv->fontselect, info->font,
info->symbol, &info->face_index, &info->glyph_index);