Skip to content

Commit

Permalink
opengl: remove lock/unlock callbacks
Browse files Browse the repository at this point in the history
They are superseded by makeCurrent() and releaseCurrent().
  • Loading branch information
Rémi Denis-Courmont committed Nov 3, 2014
1 parent 0887539 commit fef26a4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 10 additions & 0 deletions include/vlc_opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ struct vlc_gl_t
void (*releaseCurrent)(vlc_gl_t *);
void (*resize)(vlc_gl_t *, unsigned, unsigned);
void (*swap)(vlc_gl_t *);
#ifdef __APPLE__
int (*lock)(vlc_gl_t *);
void (*unlock)(vlc_gl_t *);
#endif
void*(*getProcAddress)(vlc_gl_t *, const char *);
};

Expand All @@ -75,13 +77,21 @@ static inline void vlc_gl_ReleaseCurrent(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;
#else
(void) gl; return VLC_SUCCESS;
#endif
}

static inline void vlc_gl_Unlock(vlc_gl_t *gl)
{
#ifdef __APPLE__
if (gl->unlock != NULL)
gl->unlock(gl);
#else
(void) gl;
#endif
}

static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
Expand Down
2 changes: 0 additions & 2 deletions modules/video_output/egl.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
gl->resize = Resize;
gl->swap = SwapBuffers;
gl->getProcAddress = GetSymbol;
gl->lock = NULL;
gl->unlock = NULL;
return VLC_SUCCESS;

error:
Expand Down
2 changes: 0 additions & 2 deletions modules/video_output/glx.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ static int Open (vlc_object_t *obj)
gl->resize = NULL;
gl->swap = SwapBuffers;
gl->getProcAddress = GetSymbol;
gl->lock = NULL;
gl->unlock = NULL;

#ifdef GLX_ARB_get_proc_address
bool is_swap_interval_set = false;
Expand Down
2 changes: 0 additions & 2 deletions modules/video_output/msw/glwin32.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ static int Open(vlc_object_t *object)
#endif

/* */
sys->gl.lock = NULL;
sys->gl.unlock = NULL;
sys->gl.swap = Swap;
sys->gl.getProcAddress = OurGetProcAddress;
sys->gl.sys = vd;
Expand Down

0 comments on commit fef26a4

Please sign in to comment.