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. --- sub/sd_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/sd_lavc.c') diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 496b47459c..228690fe27 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -256,7 +256,7 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res d, double pts, res->parts = priv->outbitmaps; res->num_parts = current->count; if (priv->displayed_id != current->id) - res->bitmap_id = ++res->bitmap_pos_id; + res->change_id++; priv->displayed_id = current->id; res->format = SUBBITMAP_INDEXED; -- cgit v1.2.3