[vlc-devel] [PATCH 2/2] wgl: remove extension handling

Steve Lhomme robux4 at ycbcr.xyz
Tue Feb 16 07:05:52 UTC 2021


On 2021-02-15 19:05, Alexandre Janniaux wrote:
> They are not used anymore since it was moved to the interop_dxva2
> module.
> ---
>   modules/video_output/win32/wgl.c | 22 ----------------------
>   1 file changed, 22 deletions(-)
> 
> diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c
> index 0622e3e590..e6ed1a6f17 100644
> --- a/modules/video_output/win32/wgl.c
> +++ b/modules/video_output/win32/wgl.c
> @@ -65,19 +65,12 @@ struct vout_display_sys_t
>       HMODULE               hOpengl;
>       vlc_gl_t              *gl;
>       HDC                   affinityHDC; // DC for the selected GPU
> -
> -    struct
> -    {
> -        PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT;
> -        PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB;
> -    } exts;
>   };
>   
>   static void          Swap(vlc_gl_t *);
>   static void          *OurGetProcAddress(vlc_gl_t *, const char *);
>   static int           MakeCurrent(vlc_gl_t *gl);
>   static void          ReleaseCurrent(vlc_gl_t *gl);
> -static const char *  GetExtensionsString(vlc_gl_t *gl);
>   
>   #define VLC_PFD_INITIALIZER { \
>       .nSize = sizeof(PIXELFORMATDESCRIPTOR), \
> @@ -225,10 +218,6 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
>   #define LOAD_EXT(name, type) \
>       sys->exts.name = (type) wglGetProcAddress("wgl" #name )

You should remove this macro ^ as well.

> -    LOAD_EXT(GetExtensionsStringEXT, PFNWGLGETEXTENSIONSSTRINGEXTPROC);
> -    if (!sys->exts.GetExtensionsStringEXT)
> -        LOAD_EXT(GetExtensionsStringARB, PFNWGLGETEXTENSIONSSTRINGARBPROC);
> -
>       wglMakeCurrent(sys->hGLDC, NULL);
>   
>       gl->ext = VLC_GL_EXT_WGL;
> @@ -239,9 +228,6 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
>       gl->get_proc_address = OurGetProcAddress;
>       gl->destroy = Close;
>   
> -    if (sys->exts.GetExtensionsStringEXT || sys->exts.GetExtensionsStringARB)
> -        gl->wgl.getExtensionsString = GetExtensionsString;
> -
>       (void) width; (void) height;
>       return VLC_SUCCESS;
>   
> @@ -298,11 +284,3 @@ static void ReleaseCurrent(vlc_gl_t *gl)
>       vout_display_sys_t *sys = gl->sys;
>       wglMakeCurrent (sys->hGLDC, NULL);
>   }
> -
> -static const char *GetExtensionsString(vlc_gl_t *gl)
> -{
> -    vout_display_sys_t *sys = gl->sys;
> -    return sys->exts.GetExtensionsStringEXT ?
> -            sys->exts.GetExtensionsStringEXT() :
> -            sys->exts.GetExtensionsStringARB(sys->hGLDC);
> -}
> -- 
> 2.30.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list