diff options
author | wm4 <wm4@nowhere> | 2015-08-13 12:23:18 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-13 12:23:18 +0200 |
commit | 0ba44d5fef13c54eb3c2fb508d280e27701b34fb (patch) | |
tree | 5fa6f3f7e1c85d18e897f39ce89b45b2ac4f5fa2 /video/out/vo_rpi.c | |
parent | ed09e78fb95f57b4733c9269ba862d39ae5b4061 (diff) | |
download | mpv-0ba44d5fef13c54eb3c2fb508d280e27701b34fb.tar.bz2 mpv-0ba44d5fef13c54eb3c2fb508d280e27701b34fb.tar.xz |
vo_rpi: skip OSD rendering when repeating frames
It's unnecessary and slow. Doesn't help too much, though.
Diffstat (limited to 'video/out/vo_rpi.c')
-rw-r--r-- | video/out/vo_rpi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c index 28e8641a50..b1d520c068 100644 --- a/video/out/vo_rpi.c +++ b/video/out/vo_rpi.c @@ -71,7 +71,7 @@ struct priv { MMAL_COMPONENT_T *renderer; bool renderer_enabled; - bool display_synced; + bool display_synced, skip_osd; struct mp_image *next_image; // for RAM input @@ -345,8 +345,11 @@ static void flip_page(struct vo *vo) p->next_image = NULL; // For OSD - vc_dispmanx_update_submit_sync(p->update); - p->update = vc_dispmanx_update_start(10); + if (!p->skip_osd) { + vc_dispmanx_update_submit_sync(p->update); + p->update = vc_dispmanx_update_start(10); + } + p->skip_osd = false; if (mpi) { MMAL_PORT_T *input = p->renderer->input[0]; @@ -387,7 +390,8 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) // Redraw only if the OSD has meaningfully changed, which we assume it // hasn't when a frame is merely repeated for display sync. - if (frame->redraw || !frame->repeat) + p->skip_osd = !frame->redraw && frame->repeat; + if (!p->skip_osd) update_osd(vo); p->display_synced = frame->display_synced; |