[vlc-devel] [PATCH 15/18] opengl: remove pf_fragment_shader_init()

Romain Vimont rom1v at videolabs.io
Fri Dec 20 15:48:57 CET 2019


It is not used anymore: the modules call importer->init() instead.
---
 modules/video_output/opengl/converter.h   | 28 -----------------------
 modules/video_output/opengl/vout_helper.c |  1 -
 2 files changed, 29 deletions(-)

diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h
index 39414971be..7f675d60a9 100644
--- a/modules/video_output/opengl/converter.h
+++ b/modules/video_output/opengl/converter.h
@@ -55,11 +55,6 @@ struct opengl_tex_converter_t
     /* True to dump shaders, set by the caller */
     bool b_dump_shaders;
 
-    /* Function pointer to the shader init command, set by the caller, see
-     * opengl_fragment_shader_init() documentation. */
-    GLuint (*pf_fragment_shader_init)(opengl_tex_converter_t *, GLenum,
-                                      vlc_fourcc_t, video_color_space_t);
-
     /* GLSL version, set by the caller. 100 for GLSL ES, 120 for desktop GLSL */
     unsigned glsl_version;
     /* Precision header, set by the caller. In OpenGLES, the fragment language
@@ -115,27 +110,4 @@ struct opengl_tex_converter_t
                               float alpha);
 };
 
-/**
- * Generate a fragment shader
- *
- * This utility function can be used by hw opengl tex converters that need a
- * generic fragment shader. It will compile a fragment shader generated from
- * the chroma and the tex target. This will initialize all elements of the
- * opengl_tex_converter_t struct except for priv, pf_allocate_texture,
- * pf_get_pool, pf_update
- *
- * \param tc OpenGL tex converter
- * \param tex_target GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE
- * \param chroma chroma used to generate the fragment shader
- * \param yuv_space if not COLOR_SPACE_UNDEF, YUV planes will be converted to
- * RGB according to the color space
- * \return the compiled fragment shader or 0 in case of error
- */
-static inline GLuint
-opengl_fragment_shader_init(opengl_tex_converter_t *tc, GLenum tex_target,
-                            vlc_fourcc_t chroma, video_color_space_t yuv_space)
-{
-    return tc->pf_fragment_shader_init(tc, tex_target, chroma, yuv_space);
-}
-
 #endif /* include-guard */
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index caae213793..caba316101 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -547,7 +547,6 @@ opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
     tc->gl = vgl->gl;
     tc->vt = &vgl->vt;
     tc->b_dump_shaders = b_dump_shaders;
-    tc->pf_fragment_shader_init = opengl_fragment_shader_init_impl;
 #if defined(USE_OPENGL_ES2)
     imp->is_gles = true;
     tc->glsl_version = 100;
-- 
2.24.1



More information about the vlc-devel mailing list