Skip to content

Commit

Permalink
sub/osd: remove bogus osd redraw notification resetting
Browse files Browse the repository at this point in the history
Added in 56616b0. Note that it was
called osd_draw then and not osd_render. Anyways, this line doesn't make
any sense today because vo_gpu_next in fact does not call osd_draw (or
any similar API) after this. Resetting the bool here instead seems to
cause redraws to be missed. For the other handful of VOs that use this,
there is no difference. They all use the mp_draw_sub_overlay call and
the playloop appropriately takes care of the redraw notification value.
Fixes #15963.
  • Loading branch information
Dudemanguy committed Feb 26, 2025
1 parent ab4421e commit 5338f4b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions sub/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,6 @@ struct sub_bitmap_list *osd_render(struct osd_state *osd, struct mp_osd_res res,
talloc_free(imgs);
}

// If this is called with OSD_DRAW_SUB_ONLY or OSD_DRAW_OSD_ONLY set, assume
// it will always draw the complete OSD by doing multiple osd_draw() calls.
// OSD_DRAW_SUB_FILTER on the other hand is an evil special-case, and we
// must not reset the flag when it happens.
if (!(draw_flags & OSD_DRAW_SUB_FILTER))
osd->want_redraw_notification = false;

double elapsed = MP_TIME_NS_TO_MS(mp_time_ns() - start_time);
bool slow = elapsed > 5;
mp_msg(osd->log, slow ? MSGL_DEBUG : MSGL_TRACE, "Spent %.3f ms in %s%s\n",
Expand Down

0 comments on commit 5338f4b

Please sign in to comment.