mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gl: window-gbm: Remove unneeded extra function
The cleanup function was only called in _close() which was only calling that function. This indirection didn't make much sense.
This commit is contained in:
parent
0ac7d1187b
commit
6f7fbbfa71
1 changed files with 9 additions and 18 deletions
|
@ -50,8 +50,6 @@ static void gst_gl_window_gbm_egl_close (GstGLWindow * window);
|
||||||
static void gst_gl_window_gbm_egl_draw (GstGLWindow * window);
|
static void gst_gl_window_gbm_egl_draw (GstGLWindow * window);
|
||||||
|
|
||||||
static gboolean gst_gl_window_gbm_init_surface (GstGLWindowGBMEGL * window_egl);
|
static gboolean gst_gl_window_gbm_init_surface (GstGLWindowGBMEGL * window_egl);
|
||||||
static void gst_gl_window_gbm_egl_cleanup (GstGLWindowGBMEGL * window_egl);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -112,7 +110,15 @@ gst_gl_window_gbm_egl_close (GstGLWindow * window)
|
||||||
{
|
{
|
||||||
GstGLWindowGBMEGL *window_egl = GST_GL_WINDOW_GBM_EGL (window);
|
GstGLWindowGBMEGL *window_egl = GST_GL_WINDOW_GBM_EGL (window);
|
||||||
|
|
||||||
gst_gl_window_gbm_egl_cleanup (window_egl);
|
if (window_egl->gbm_surf != NULL) {
|
||||||
|
if (window_egl->current_bo != NULL) {
|
||||||
|
gbm_surface_release_buffer (window_egl->gbm_surf, window_egl->current_bo);
|
||||||
|
window_egl->current_bo = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gbm_surface_destroy (window_egl->gbm_surf);
|
||||||
|
window_egl->gbm_surf = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
GST_GL_WINDOW_CLASS (gst_gl_window_gbm_egl_parent_class)->close (window);
|
GST_GL_WINDOW_CLASS (gst_gl_window_gbm_egl_parent_class)->close (window);
|
||||||
}
|
}
|
||||||
|
@ -344,21 +350,6 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_gl_window_gbm_egl_cleanup (GstGLWindowGBMEGL * window_egl)
|
|
||||||
{
|
|
||||||
if (window_egl->gbm_surf != NULL) {
|
|
||||||
if (window_egl->current_bo != NULL) {
|
|
||||||
gbm_surface_release_buffer (window_egl->gbm_surf, window_egl->current_bo);
|
|
||||||
window_egl->current_bo = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
gbm_surface_destroy (window_egl->gbm_surf);
|
|
||||||
window_egl->gbm_surf = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Must be called in the gl thread */
|
/* Must be called in the gl thread */
|
||||||
GstGLWindowGBMEGL *
|
GstGLWindowGBMEGL *
|
||||||
gst_gl_window_gbm_egl_new (GstGLDisplay * display)
|
gst_gl_window_gbm_egl_new (GstGLDisplay * display)
|
||||||
|
|
Loading…
Reference in a new issue