[MPlayer-cvslog] r35710 - trunk/libvo/vo_gl.c

reimar subversion at mplayerhq.hu
Mon Dec 24 21:15:26 CET 2012


Author: reimar
Date: Mon Dec 24 21:15:26 2012
New Revision: 35710

Log:
Fix missing screen clear with -nodouble.

Modified:
   trunk/libvo/vo_gl.c

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Mon Dec 24 15:22:46 2012	(r35709)
+++ trunk/libvo/vo_gl.c	Mon Dec 24 21:15:26 2012	(r35710)
@@ -907,6 +907,7 @@ static void do_render(void) {
 }
 
 static void flip_page(void) {
+  int need_clear = aspect_scaling() && use_aspect;
   // We might get an expose event between draw_image and its
   // corresponding flip_page.
   // For double-buffering we would then flip in a clear backbuffer.
@@ -914,18 +915,20 @@ static void flip_page(void) {
   // current GL buffer contains a properly rendered video.
   // did_render will always be false for single buffer.
   if (!did_render) {
+    if (!vo_doublebuffering && need_clear)
+      mpglClear(GL_COLOR_BUFFER_BIT);
     do_render();
     do_render_osd(RENDER_OSD | RENDER_EOSD);
   }
+  if (use_glFinish) mpglFinish();
+
   if (vo_doublebuffering) {
-    if (use_glFinish) mpglFinish();
     glctx.swapGlBuffers(&glctx);
-    if (aspect_scaling() && use_aspect)
+    if (need_clear)
       mpglClear(GL_COLOR_BUFFER_BIT);
-  } else {
-    if (use_glFinish) mpglFinish();
-    else mpglFlush();
-  }
+  } else if (!use_glFinish)
+    mpglFlush();
+
   did_render = 0;
 }
 


More information about the MPlayer-cvslog mailing list