Skip to content

sub/osd_libass: don't rerender OSD if not changed #16289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kasper93
Copy link
Member

Rendering OSD on every frame draw is quite heavy, even if some of the rendering parts are cached, it still takes significant amount of time, depending of payload can take 8-10 ms just to do the text shaping.

Instead render only when we need it.

Rendering OSD on every frame draw is quite heavy, even if some of the
rendering parts are cached, it still takes significant amount of time,
depending of payload can take 8-10 ms just to do the text shaping.

Instead render only when we need it.
Copy link

if (obj->type == OSDTYPE_OSD && obj->osd_changed)
update_osd(osd, obj);
if (obj->type == OSDTYPE_OSD) {
if (obj->osd_changed) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably unreachable in practice but an osd_state is created with osd_changed set to false, so this would break. could simply init it to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants