mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
osd: simplify an aspect of change detection handling
There was a somewhat obscure optimization in the OSD and subtitle rendering path: if only the position of the sub-images changed, and not the actual image data, uploading of the image data could be skipped. In theory, this could speed up things like scrolling subtitles. But it turns out that even in the rare cases subtitles have such scrolls or axis-aligned movement, modern libass rarely signals this kind of change. Possibly this is because of sub-pixel handling and such, which break this. As such, it's a worthless optimization and just introduces additional complexity and subtle bugs (especially in cases libass does the opposite: incorrectly signaling a position change only, which happened before). Remove this optimization, and rename bitmap_pos_id to change_id.
This commit is contained in:
@@ -36,8 +36,7 @@ struct osd_object {
|
||||
struct sub_bitmaps cached;
|
||||
|
||||
// VO cache state
|
||||
int vo_bitmap_id;
|
||||
int vo_bitmap_pos_id;
|
||||
int vo_change_id;
|
||||
struct mp_osd_res vo_res;
|
||||
|
||||
// Internally used by osd_libass.c
|
||||
|
||||
Reference in New Issue
Block a user