[MPlayer-cvslog] r36321 - trunk/libvo/vo_gl.c
reimar
subversion at mplayerhq.hu
Mon Jun 10 00:03:50 CEST 2013
Author: reimar
Date: Mon Jun 10 00:03:50 2013
New Revision: 36321
Log:
Change hack to use a solution that will work more generally.
The main reason is that matrixview vo has similar issues, and
single buffering seems like a bad idea for that one.
Modified:
trunk/libvo/vo_gl.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Sun Jun 9 23:34:24 2013 (r36320)
+++ trunk/libvo/vo_gl.c Mon Jun 10 00:03:50 2013 (r36321)
@@ -701,16 +701,6 @@ config(uint32_t width, uint32_t height,
is_xyz = IMGFMT_IS_XYZ(image_format);
glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type);
- if (glctx.type == GLTYPE_OSX && vo_doublebuffering && !is_yuv) {
- // doublebuffering causes issues when e.g. drawing yuy2 or rgb textures
- // (nothing is draw) unless using glfinish which makes things slow.
- // This is possibly because we do not actually request a double-buffered
- // context.
- // However single-buffering causes slowdown and artefacts when
- // drawing planar formats. Mostly tested on PPC MacMini
- mp_msg(MSGT_VO, MSGL_INFO, "[gl] -double not supported on OSX for interleaved formats, switching to -nodouble\n");
- vo_doublebuffering = 0;
- }
vo_flipped = !!(flags & VOFLAG_FLIPPING);
if (create_window(d_width, d_height, flags, title) < 0)
@@ -908,6 +898,13 @@ static void flip_page(void) {
do_render_osd(RENDER_OSD | RENDER_EOSD);
}
if (use_glFinish) mpglFinish();
+ else if (glctx.type == GLTYPE_OSX && vo_doublebuffering && !is_yuv)
+ // At least on PPC Mac Mini this combination leads to
+ // no image at all being show, however for the planar YUV
+ // case the flush causes a significant slowdown.
+ // Note that always using single-buffering is not a good solution since
+ // it causes artefacts with planar YUV.
+ mpglFlush();
if (vo_doublebuffering) {
glctx.swapGlBuffers(&glctx);
More information about the MPlayer-cvslog
mailing list