Commit fef26a45 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

opengl: remove lock/unlock callbacks

They are superseded by makeCurrent() and releaseCurrent().
parent 08875399
...@@ -49,8 +49,10 @@ struct vlc_gl_t ...@@ -49,8 +49,10 @@ struct vlc_gl_t
void (*releaseCurrent)(vlc_gl_t *); void (*releaseCurrent)(vlc_gl_t *);
void (*resize)(vlc_gl_t *, unsigned, unsigned); void (*resize)(vlc_gl_t *, unsigned, unsigned);
void (*swap)(vlc_gl_t *); void (*swap)(vlc_gl_t *);
#ifdef __APPLE__
int (*lock)(vlc_gl_t *); int (*lock)(vlc_gl_t *);
void (*unlock)(vlc_gl_t *); void (*unlock)(vlc_gl_t *);
#endif
void*(*getProcAddress)(vlc_gl_t *, const char *); void*(*getProcAddress)(vlc_gl_t *, const char *);
}; };
...@@ -75,13 +77,21 @@ static inline void vlc_gl_ReleaseCurrent(vlc_gl_t *gl) ...@@ -75,13 +77,21 @@ static inline void vlc_gl_ReleaseCurrent(vlc_gl_t *gl)
static inline int vlc_gl_Lock(vlc_gl_t *gl) static inline int vlc_gl_Lock(vlc_gl_t *gl)
{ {
#ifdef __APPLE__
return (gl->lock != NULL) ? gl->lock(gl) : VLC_SUCCESS; return (gl->lock != NULL) ? gl->lock(gl) : VLC_SUCCESS;
#else
(void) gl; return VLC_SUCCESS;
#endif
} }
static inline void vlc_gl_Unlock(vlc_gl_t *gl) static inline void vlc_gl_Unlock(vlc_gl_t *gl)
{ {
#ifdef __APPLE__
if (gl->unlock != NULL) if (gl->unlock != NULL)
gl->unlock(gl); gl->unlock(gl);
#else
(void) gl;
#endif
} }
static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h) static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
......
...@@ -359,8 +359,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api) ...@@ -359,8 +359,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
gl->resize = Resize; gl->resize = Resize;
gl->swap = SwapBuffers; gl->swap = SwapBuffers;
gl->getProcAddress = GetSymbol; gl->getProcAddress = GetSymbol;
gl->lock = NULL;
gl->unlock = NULL;
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
......
...@@ -208,8 +208,6 @@ static int Open (vlc_object_t *obj) ...@@ -208,8 +208,6 @@ static int Open (vlc_object_t *obj)
gl->resize = NULL; gl->resize = NULL;
gl->swap = SwapBuffers; gl->swap = SwapBuffers;
gl->getProcAddress = GetSymbol; gl->getProcAddress = GetSymbol;
gl->lock = NULL;
gl->unlock = NULL;
#ifdef GLX_ARB_get_proc_address #ifdef GLX_ARB_get_proc_address
bool is_swap_interval_set = false; bool is_swap_interval_set = false;
......
...@@ -204,8 +204,6 @@ static int Open(vlc_object_t *object) ...@@ -204,8 +204,6 @@ static int Open(vlc_object_t *object)
#endif #endif
/* */ /* */
sys->gl.lock = NULL;
sys->gl.unlock = NULL;
sys->gl.swap = Swap; sys->gl.swap = Swap;
sys->gl.getProcAddress = OurGetProcAddress; sys->gl.getProcAddress = OurGetProcAddress;
sys->gl.sys = vd; sys->gl.sys = vd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment