gstglcolorconvert: micro optimization
authorAlessandro Decina <alessandro.d@gmail.com>
Thu, 22 Jan 2015 02:18:23 +0000 (13:18 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:53 +0000 (19:31 +0000)
Don't call glClear && glClearColor at each draw since we're going to draw the
whole viewport anyway. Gets rid of a glFlush triggered by glClear on OSX.

gst-libs/gst/gl/gstglcolorconvert.c

index 34dfb5e..95262f9 100644 (file)
@@ -1540,9 +1540,6 @@ _do_convert_draw (GstGLContext * context, GstGLColorConvert * convert)
 
   gl->Viewport (0, 0, out_width, out_height);
 
-  gl->ClearColor (0.0, 0.0, 0.0, 0.0);
-  gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
   gst_gl_shader_use (convert->shader);
 
   if (gl->BindVertexArray)