diff options
author | Dudemanguy <random342@airmail.cc> | 2024-01-21 19:10:22 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-15 16:43:11 +0000 |
commit | 25bba7c811fd203f4f9a8dfb1350e3bd79ed719e (patch) | |
tree | 3e29c7a3691d3b269ebc442a657df841069f190d /video | |
parent | 8f043de961f5b57c60e61e49b1841ad20faa64fe (diff) | |
download | mpv-25bba7c811fd203f4f9a8dfb1350e3bd79ed719e.tar.bz2 mpv-25bba7c811fd203f4f9a8dfb1350e3bd79ed719e.tar.xz |
vo_gpu_next: move the frame->redraw check for blended subtitles
Cosmetic. Since the previous commit eliminated wasteful redraws, nuke
the comment while we're at it.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_gpu_next.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 99e7754a50..a4274a65eb 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1025,7 +1025,9 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) struct frame_priv *fp = mpi->priv; apply_crop(image, p->src, vo->params->w, vo->params->h); if (opts->blend_subs) { - if (frame->redraw || fp->osd_sync < p->osd_sync) { + if (frame->redraw) + p->osd_sync++; + if (fp->osd_sync < p->osd_sync) { float rx = pl_rect_w(p->dst) / pl_rect_w(image->crop); float ry = pl_rect_h(p->dst) / pl_rect_h(image->crop); struct mp_osd_res res = { @@ -1037,9 +1039,6 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) .mb = (image->crop.y1 - vo->params->h) * ry, .display_par = 1.0, }; - // TODO: fix this doing pointless updates - if (frame->redraw) - p->osd_sync++; update_overlays(vo, res, OSD_DRAW_SUB_ONLY, PL_OVERLAY_COORDS_DST_CROP, &fp->subs, image, mpi); |