0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/video/out/opengl
wm4 26f4f18c06 options: change option macros and all option declarations
Change all OPT_* macros such that they don't define the entire m_option
initializer, and instead expand only to a part of it, which sets certain
fields. This requires changing almost every option declaration, because
they all use these macros. A declaration now always starts with

   {"name", ...

followed by designated initializers only (possibly wrapped in macros).
The OPT_* macros now initialize the .offset and .type fields only,
sometimes also .priv and others.

I think this change makes the option macros less tricky. The old code
had to stuff everything into macro arguments (and attempted to allow
setting arbitrary fields by letting the user pass designated
initializers in the vararg parts). Some of this was made messy due to
C99 and C11 not allowing 0-sized varargs with ',' removal. It's also
possible that this change is pointless, other than cosmetic preferences.

Not too happy about some things. For example, the OPT_CHOICE()
indentation I applied looks a bit ugly.

Much of this change was done with regex search&replace, but some places
required manual editing. In particular, code in "obscure" areas (which I
didn't include in compilation) might be broken now.

In wayland_common.c the author of some option declarations confused the
flags parameter with the default value (though the default value was
also properly set below). I fixed this with this change.
2020-03-18 19:52:01 +01:00
..
angle_dynamic.c angle_dynamic: silence warnings during compilation 2016-11-25 09:49:49 +01:00
angle_dynamic.h vo_opengl: angle: rewrite with custom swap chain 2017-02-07 22:45:07 +11:00
common.c OpenGL: Also detect softpipe as a software driver 2020-02-25 21:32:04 +02:00
common.h client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
context_android.c context_android: move common code to a separate file 2019-09-27 00:05:06 +03:00
context_angle.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
context_cocoa.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
context_drm_egl.c drm: avoid division by 0 in drm_pflip_cb with bad drivers 2019-12-07 18:34:25 +01:00
context_dxinterop.c vo: make swapchain-depth option generic for all VOs 2019-09-28 14:10:01 +03:00
context_glx.c vo_gpu: context_glx: Add X11 native resource 2019-11-16 15:35:32 -08:00
context_rpi.c rpi: destroy fullscreen change handling 2019-12-11 18:50:37 +01:00
context_wayland.c wayland: remove wayland-frame-wait-offset option 2020-01-31 00:40:44 +00:00
context_win.c vo_gpu: win: remove exclusive-fullscreen detection hack 2017-12-20 14:53:41 +11:00
context_x11egl.c vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
context.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
context.h vo: use a struct for vsync feedback stuff 2018-12-06 10:30:25 +01:00
egl_helpers.c vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
egl_helpers.h vo_gpu: opengl: make it work with EGL 1.4 2019-12-16 00:25:51 +01:00
formats.c vo_opengl: remove some dead code 2017-08-11 21:29:35 +02:00
formats.h vo_opengl: refactor into vo_gpu 2017-09-21 15:00:55 +02:00
gl_headers.h vo_gpu: opengl: add hack for ancient Mesa/GLX 2019-11-30 13:38:28 +01:00
hwdec_d3d11egl.c vo_gpu: hwdec_d3d11egl: add missing P010 format to supported list 2019-10-17 22:45:05 +02:00
hwdec_drmprime_drm.c drm_prime: double free bug 2020-03-05 18:12:57 +01:00
hwdec_dxva2egl.c hwdec: don't require setting legacy hwdec fields 2017-12-02 04:53:51 +01:00
hwdec_dxva2gldx.c client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
hwdec_ios.m hwdec_ios: fix crash after mapper_init failure 2018-04-17 01:06:29 +03:00
hwdec_osx.c hwdec: don't require setting legacy hwdec fields 2017-12-02 04:53:51 +01:00
hwdec_rpi.c client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
hwdec_vdpau.c vo_gpu: hwdec_vdpau: remove direct_mode 2019-12-28 14:31:06 -08:00
libmpv_gl.c client API: add a new way to pass X11 Display etc. to render API 2018-03-26 19:47:08 +02:00
oml_sync.c oml_sync: fix typo in comment 2019-09-20 00:32:29 +02:00
oml_sync.h vo_gpu: glx: move OML sync code to an independent file 2019-09-08 23:23:43 +10:00
ra_gl.c vo_gpu: opengl: add support for IMGFMT_RGB30 2019-11-02 17:46:46 +01:00
ra_gl.h vo_opengl: refactor into vo_gpu 2017-09-21 15:00:55 +02:00
utils.c vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
utils.h vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00