1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-10 08:59:45 +00:00
mpv/video/out
Anton Kindestam 537006965e context_drm_egl: implement n-buffering
This allows context_drm_egl to use as many buffers as libgbm or the
swapchain_depth setting allows (whichever is smaller).

On pause and on still images (cover art etc.) to make sure that output does not
lag behind user input, the swapchain is drained and reverts to working in a dual
buffered (equivalent to swapchain-depth=1) manner.

When possible (swapchain-depth>=2), the wait on the page flip event is now not
done immediately after queueing, but is deferred to the next invocation of
swap_buffers. Which should give us more CPU time between invocations.

Although, since gbm_surface_has_free_buffers() can only tell us a boolean value
and not how many buffers we have left, we are forced to do this contortionist
dance where we first overshoot until gbm_surface_has_free_buffers() reports 0,
followed by immediately waiting so we can free a buffer, to be able to get the
deferred wait on page flip rolling.

With this commit we do not rely on the default vsync fences/latency emulation of
video/out/opengl/context.c, but supply our own, since the places we create and
wait for the fences needs to be somewhat different for best performance.

Minor fixes:

 * According to GBM documentation all BO:s gotten with
   gbm_surface_lock_front_buffer must be released before gbm_surface_destroy is
   called on the surface.
 * We let the page flip handler function handle the waiting_for_flip flag.
2019-02-25 01:25:25 +01:00
..
cocoa cocoa: fix drawing on macOS 10.14 2018-11-13 21:14:29 +02:00
cocoa-cb cocoa-cb: remove empty elements from dropped URLs 2019-02-10 23:47:34 +02:00
d3d11 vo_gpu: d3d11: implement tex_download() 2018-02-13 21:25:15 +11:00
gpu vo_gpu: fix initial seeding of the peak detect ssbo 2019-02-18 01:54:06 +02:00
opengl context_drm_egl: implement n-buffering 2019-02-25 01:25:25 +01:00
vulkan spirv: remove --spirv-compiler=nvidia 2018-12-01 15:50:23 +02:00
win32
aspect.c
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_cb_common.swift cocoa-cb: add support for VOCTRL_GET_DISPLAY_NAMES 2019-02-10 22:39:25 +02:00
cocoa_common.h
cocoa_common.m {mac,cocoa}: trim trailing null out of macosx_icon when loading it 2018-10-02 00:20:43 +03:00
d3d_shader_420p.h
d3d_shader_yuv.hlsl
dither.c
dither.h
dr_helper.c vo: move DR helper code to a separate source file 2018-04-29 02:21:32 +03:00
dr_helper.h vo: move DR helper code to a separate source file 2018-04-29 02:21:32 +03:00
drm_atomic.c drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
drm_atomic.h drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
drm_common.c drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
drm_common.h drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
drm_prime.c
drm_prime.h
filter_kernels.c
filter_kernels.h
libmpv.h vo_libmpv: support render performance data 2018-11-13 20:43:29 +02:00
vo_caca.c
vo_direct3d.c
vo_drm.c drm: rename plane options to better, invariant, names 2018-12-01 15:42:20 +02:00
vo_gpu.c vo_gpu: move some extra code for screenshot to video.c 2018-04-20 17:05:53 +02:00
vo_image.c
vo_lavc.c encode: get rid of the output packet queue 2018-05-03 01:08:44 +03:00
vo_libmpv.c vo_libmpv: support render performance data 2018-11-13 20:43:29 +02:00
vo_mediacodec_embed.c vo_mediacodec_embed: fix forgotten VO_CAP_NOREDRAW→VO_CAP_NORETAIN 2018-02-20 01:59:20 +02:00
vo_null.c
vo_rpi.c vo_gpu: add internal ability to skip osd/subs for rendering 2018-02-11 17:45:51 -08:00
vo_sdl.c vo_sdl: add support for screensaver VOCTRL's 2018-06-02 23:34:38 +03:00
vo_tct.c
vo_vaapi.c
vo_vdpau.c vo_vdpau: fix resizing and rotation problems 2018-03-08 17:12:32 -08:00
vo_x11.c vo_x11: fix return value in resize() error paths 2018-11-17 00:53:56 +01:00
vo_xv.c
vo.c build: make encoding mode non-optional 2018-05-03 01:08:44 +03:00
vo.h encode: get rid of the output packet queue 2018-05-03 01:08:44 +03:00
w32_common.c w32_common: use the screen working area when resizing the window 2018-11-18 00:56:34 +02:00
w32_common.h
wayland_common.c wayland_common: rename “shell” into “wm_base” 2019-02-17 23:44:34 +02:00
wayland_common.h wayland_common: rename “shell” into “wm_base” 2019-02-17 23:44:34 +02:00
win_state.c video: change some remaining vo_opengl mentions to vo_gpu 2018-01-20 14:43:49 -08:00
win_state.h
x11_common.c x11: fix icc profile when the window goes near off screen 2018-10-21 23:32:50 +02:00
x11_common.h