From fd52cb65f43d262493724899c7b0fb49971f745d Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 28 Aug 2012 19:12:27 +0300 Subject: subs, vo: do sub bitmap change detection by comparing IDs vo_vdpau and vo_gl cache the last subtitle bitmaps uploaded to video card in case they stay the same over multiple frames. Detecting whether the bitmaps have changed and should be re-uploaded was somewhat fragile. Change the VO API to provide a bitmap ID which can be compared with what the VO has to determine whether a new upload of the bitmaps is needed. Conflicts: libvo/vo_gl.c Note: the changes for vo_gl.c were not merged. Instead, eosd_packer is modified to use the new way of detecting EOSD changes. This takes care of vo_gl, vo_gl3 and vo_direct3d, which all render EOSD. They don't need to be updated in turn. --- sub/sub.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sub/sub.h') diff --git a/sub/sub.h b/sub/sub.h index 8a8a2ab941..05c89af565 100644 --- a/sub/sub.h +++ b/sub/sub.h @@ -63,7 +63,8 @@ struct osd_state { struct ass_library *ass_library; struct ass_renderer *ass_renderer; struct sh_sub *sh_sub; - bool changed_outside_sd; + int bitmap_id; + int bitmap_pos_id; double sub_pts; double sub_offset; struct mp_eosd_res dim; -- cgit v1.2.3