summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-18 10:32:47 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-18 14:35:20 +0200
commit61db9ad941453f4d852ecdcf201cb994fcd25203 (patch)
tree80b2633934b0d6f09f3c0f8b83422d23763ec6e3 /ext
parent147edd1fc299b1d6bac19ceeb69f0a1612151568 (diff)
downloadgstreamer-plugins-bad-61db9ad941453f4d852ecdcf201cb994fcd25203.tar.gz
eglglessink: Also clear the surface once when the buffer content is preserved
Diffstat (limited to 'ext')
-rw-r--r--ext/eglgles/gsteglglessink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/eglgles/gsteglglessink.c b/ext/eglgles/gsteglglessink.c
index 3f9889bfd..f4c07a94c 100644
--- a/ext/eglgles/gsteglglessink.c
+++ b/ext/eglgles/gsteglglessink.c
@@ -1899,6 +1899,12 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
eglglessink->eglglesctx.surface_width,
eglglessink->eglglesctx.surface_height);
+ /* Clear the surface once if its content is preserved */
+ if (eglglessink->eglglesctx.buffer_preserved) {
+ glClearColor (0.0, 0.0, 0.0, 1.0);
+ glClear (GL_COLOR_BUFFER_BIT);
+ }
+
if (!gst_eglglessink_setup_vbo (eglglessink, FALSE)) {
GST_ERROR_OBJECT (eglglessink, "VBO setup failed");
goto HANDLE_ERROR;