summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-27 16:29:22 +0200
committerwm4 <wm4@nowhere>2016-09-27 16:29:22 +0200
commitc239b7de7efbe3e87a9c09922c88e6a88777fb80 (patch)
tree6a7e7005373226c61c5f390cd60e6e3082836607 /video
parent45c97aea78de3232721d3392a9d8935457c0ca0e (diff)
downloadmpv-c239b7de7efbe3e87a9c09922c88e6a88777fb80.tar.bz2
mpv-c239b7de7efbe3e87a9c09922c88e6a88777fb80.tar.xz
vo_opengl: deprecate 'drm-egl' backend and introduce 'drm' instead
Just a name change. Requested.
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/context.c2
-rw-r--r--video/out/opengl/context_drm_egl.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index 32e7c4a3d6..0f5b61e37c 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -38,6 +38,7 @@ extern const struct mpgl_driver mpgl_driver_x11;
extern const struct mpgl_driver mpgl_driver_x11egl;
extern const struct mpgl_driver mpgl_driver_x11_probe;
extern const struct mpgl_driver mpgl_driver_drm_egl;
+extern const struct mpgl_driver mpgl_driver_drm;
extern const struct mpgl_driver mpgl_driver_cocoa;
extern const struct mpgl_driver mpgl_driver_wayland;
extern const struct mpgl_driver mpgl_driver_w32;
@@ -77,6 +78,7 @@ static const struct mpgl_driver *const backends[] = {
&mpgl_driver_x11,
#endif
#if HAVE_EGL_DRM
+ &mpgl_driver_drm,
&mpgl_driver_drm_egl,
#endif
#if HAVE_MALI_FBDEV
diff --git a/video/out/opengl/context_drm_egl.c b/video/out/opengl/context_drm_egl.c
index 07624ccaf3..ef7a0b598b 100644
--- a/video/out/opengl/context_drm_egl.c
+++ b/video/out/opengl/context_drm_egl.c
@@ -348,6 +348,14 @@ static int drm_egl_init(struct MPGLContext *ctx, int flags)
return 0;
}
+static int drm_egl_init_deprecated(struct MPGLContext *ctx, int flags)
+{
+ if (ctx->vo->probing)
+ return -1;
+ MP_WARN(ctx->vo, "'drm-egl' is deprecated, use 'drm' instead.\n");
+ return drm_egl_init(ctx, flags);
+}
+
static int drm_egl_reconfig(struct MPGLContext *ctx)
{
struct priv *p = ctx->priv;
@@ -405,10 +413,20 @@ static void drm_egl_swap_buffers(MPGLContext *ctx)
p->gbm.bo = p->gbm.next_bo;
}
+const struct mpgl_driver mpgl_driver_drm = {
+ .name = "drm",
+ .priv_size = sizeof(struct priv),
+ .init = drm_egl_init,
+ .reconfig = drm_egl_reconfig,
+ .swap_buffers = drm_egl_swap_buffers,
+ .control = drm_egl_control,
+ .uninit = drm_egl_uninit,
+};
+
const struct mpgl_driver mpgl_driver_drm_egl = {
.name = "drm-egl",
.priv_size = sizeof(struct priv),
- .init = drm_egl_init,
+ .init = drm_egl_init_deprecated,
.reconfig = drm_egl_reconfig,
.swap_buffers = drm_egl_swap_buffers,
.control = drm_egl_control,