[vlc-commits] opengl: simplify opengl_init_program()
Romain Vimont
git at videolan.org
Thu Feb 13 23:13:00 CET 2020
vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Tue Jan 21 16:09:41 2020 +0100| [4c3131ffe240e89498d6c633230b9af9e6f5875d] | committer: Jean-Baptiste Kempf
opengl: simplify opengl_init_program()
The vout_helper now only manages the rendering of the "main" pictures,
so it never renders subpictures anymore (this has been moved to
vlc_gl_sub_renderer).
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c3131ffe240e89498d6c633230b9af9e6f5875d
---
modules/video_output/opengl/vout_helper.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 3888cdaee7..3f01863145 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -431,7 +431,7 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
static int
opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
- struct prgm *prgm, const video_format_t *fmt, bool subpics,
+ struct prgm *prgm, const video_format_t *fmt,
bool b_dump_shaders)
{
opengl_tex_converter_t *tc = calloc(1, sizeof(*tc));
@@ -439,7 +439,7 @@ opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
return VLC_ENOMEM;
struct vlc_gl_interop *interop =
- vlc_gl_interop_New(vgl->gl, &vgl->vt, context, fmt, subpics);
+ vlc_gl_interop_New(vgl->gl, &vgl->vt, context, fmt, false);
if (!interop)
{
free(tc);
@@ -461,18 +461,15 @@ opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
#ifdef HAVE_LIBPLACEBO
// Create the main libplacebo context
- if (!subpics)
- {
- tc->pl_ctx = vlc_placebo_Create(VLC_OBJECT(vgl->gl));
- if (tc->pl_ctx) {
+ tc->pl_ctx = vlc_placebo_Create(VLC_OBJECT(vgl->gl));
+ if (tc->pl_ctx) {
# if PL_API_VER >= 20
- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL);
+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL);
# elif PL_API_VER >= 6
- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0);
+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0);
# else
- tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0);
+ tc->pl_sh = pl_shader_alloc(tc->pl_ctx, NULL, 0, 0);
# endif
- }
}
#endif
@@ -681,7 +678,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
}
GL_ASSERT_NOERROR();
- int ret = opengl_init_program(vgl, context, &vgl->prgm, fmt, false,
+ int ret = opengl_init_program(vgl, context, &vgl->prgm, fmt,
b_dump_shaders);
if (ret != VLC_SUCCESS)
{
More information about the vlc-commits
mailing list