From: Julien Isorce Date: Sat, 19 Sep 2009 12:31:28 +0000 (+0200) Subject: [378/906] gldisplay: avoid to request gl thread when deleting a texture X-Git-Tag: 1.16.2~955^2~2011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95dbe51fef6e3967b257face601aa6b1e8332c05;p=platform%2Fupstream%2Fgst-plugins-base.git [378/906] gldisplay: avoid to request gl thread when deleting a texture A texture is not destroyed when when we are done with it. This texture is just added to the texture pool in order to be re-used. In this case no OpenGL code is executed so we do not need to request gl thread. --- diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index 1c15241..5834825 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -59,7 +59,6 @@ gpointer gst_gl_display_thread_create_context (GstGLDisplay * display); void gst_gl_display_thread_destroy_context (GstGLDisplay * display); void gst_gl_display_thread_run_generic (GstGLDisplay * display); void gst_gl_display_thread_gen_texture (GstGLDisplay * display); -void gst_gl_display_thread_del_texture (GstGLDisplay * display); #ifdef OPENGL_ES2 void gst_gl_display_thread_init_redisplay (GstGLDisplay * display); #endif @@ -145,9 +144,6 @@ gst_gl_display_init (GstGLDisplay * display, GstGLDisplayClass * klass) display->gen_texture = 0; display->gen_texture_width = 0; display->gen_texture_height = 0; - display->del_texture = 0; - display->del_texture_width = 0; - display->del_texture_height = 0; //client callbacks display->clientReshapeCallback = NULL; @@ -764,14 +760,6 @@ gst_gl_display_thread_gen_texture (GstGLDisplay * display) } -/* Called in the gl thread */ -void -gst_gl_display_thread_del_texture (GstGLDisplay * display) -{ - gst_gl_display_gldel_texture (display, &display->del_texture, - display->del_texture_width, display->del_texture_height); -} - #ifdef OPENGL_ES2 /* Called in the gl thread */ void @@ -2187,11 +2175,7 @@ gst_gl_display_del_texture (GstGLDisplay * display, GLuint texture, GLint width, { gst_gl_display_lock (display); if (texture) { - display->del_texture = texture; - display->del_texture_width = width; - display->del_texture_height = height; - gst_gl_window_send_message (display->gl_window, - GST_GL_WINDOW_CB (gst_gl_display_thread_del_texture), display); + gst_gl_display_gldel_texture (display, &texture, width, height); } gst_gl_display_unlock (display); } diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h index 738c6f3..146ddfb 100644 --- a/gst-libs/gst/gl/gstgldisplay.h +++ b/gst-libs/gst/gl/gstgldisplay.h @@ -113,9 +113,6 @@ struct _GstGLDisplay GLuint gen_texture; GLuint gen_texture_width; GLuint gen_texture_height; - GLuint del_texture; - GLuint del_texture_width; - GLuint del_texture_height; //client callbacks CRCB clientReshapeCallback;