diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2020-10-18 02:42:18 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2020-10-19 20:36:18 +0300 |
commit | ae4a6d27fbd3b8c5fec3d459b118ce820ee9042f (patch) | |
tree | b51af0a444e997f10a1783eaaa6ab272b1ef4b62 /libass | |
parent | fc97f85383958b6a11bbc5f9e31afaea06b04dce (diff) | |
download | libass-ae4a6d27fbd3b8c5fec3d459b118ce820ee9042f.tar.bz2 libass-ae4a6d27fbd3b8c5fec3d459b118ce820ee9042f.tar.xz |
shaper: honor/reuse starts_new_run
This removes duplicated code (and a not-fully-correct comment).
This also ensures shaping has breaks whenever the rest
of the pipeline breaks runs (e. g. for bitmap combining).
In particular, this adds missing breaks on karaoke changes,
which the old code didn't actually honor despite the comment.
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_shaper.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c index d9fd590..273bfb1 100644 --- a/libass/ass_shaper.c +++ b/libass/ass_shaper.c @@ -786,36 +786,10 @@ void ass_shaper_find_runs(ASS_Shaper *shaper, ASS_Renderer *render_priv, // set size and get glyph index ass_font_get_index(render_priv->fontselect, info->font, info->symbol, &info->face_index, &info->glyph_index); - // shape runs break on: xbord, ybord, xshad, yshad, - // all four colors, all four alphas, be, blur, fn, fs, - // fscx, fscy, fsp, bold, italic, underline, strikeout, - // frx, fry, frz, fax, fay, karaoke start, karaoke type, - // and on every line break if (i > 0 && (last->font != info->font || last->face_index != info->face_index || last->script != info->script || - last->font_size != info->font_size || - last->c[0] != info->c[0] || - last->c[1] != info->c[1] || - last->c[2] != info->c[2] || - last->c[3] != info->c[3] || - last->be != info->be || - last->blur != info->blur || - last->shadow_x != info->shadow_x || - last->shadow_y != info->shadow_y || - last->frx != info->frx || - last->fry != info->fry || - last->frz != info->frz || - last->fax != info->fax || - last->fay != info->fay || - last->scale_x != info->scale_x || - last->scale_y != info->scale_y || - last->border_style != info->border_style || - last->border_x != info->border_x || - last->border_y != info->border_y || - last->hspacing != info->hspacing || - last->italic != info->italic || - last->bold != info->bold || + info->starts_new_run || last->flags != info->flags)) shape_run++; info->shape_run_id = shape_run; |