From 51befc9debef818cbf071aebf8861457ac095f8d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Mar 2015 12:33:14 +0100 Subject: 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. --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 7db54d6cf8..782629500d 100644 --- a/player/command.c +++ b/player/command.c @@ -3931,7 +3931,7 @@ static void recreate_overlays(struct MPContext *mpctx) if (new == cmd->overlay_osd_current) new += 1; // pick the unused one new->format = SUBBITMAP_RGBA; - new->bitmap_id = new->bitmap_pos_id = 1; + new->change_id = 1; // overlay array can have unused entries, but parts list must be "packed" new->num_parts = 0; for (int n = 0; n < cmd->num_overlays; n++) { -- cgit v1.2.3