backend-glx: Remove redundant glFlush()

As noted in commit ce3f55292a an explict glFlush is needed for
both glBlitFramebuffer and glXCopySubBuffer.

_clutter_backend_glx_blit_sub_buffer was already doing an explicit
flush when using glBlitFramebuffer, so just do it unconditonally
and remove the call from clutter_stage_glx_redraw.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2558
This commit is contained in:
Adel Gadllah 2011-02-13 00:04:52 +01:00 committed by Emmanuele Bassi
parent 3a378b849b
commit 3d8445807a
2 changed files with 7 additions and 8 deletions

View File

@ -525,8 +525,14 @@ _clutter_backend_glx_blit_sub_buffer (ClutterBackendGLX *backend_glx,
x, y, x + width, y + height,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
glDrawBuffer (GL_BACK);
glFlush();
}
/* NB: unlike glXSwapBuffers, glXCopySubBuffer and
* glBlitFramebuffer don't issue an implicit glFlush() so we
* have to flush ourselves if we want the request to complete in
* finite amount of time since otherwise the driver can batch
* the command indefinitely. */
glFlush();
}
static XVisualInfo *

View File

@ -577,13 +577,6 @@ clutter_stage_glx_redraw (ClutterStageWindow *stage_window)
copy_area.width,
copy_area.height);
CLUTTER_TIMER_STOP (_clutter_uprof_context, blit_sub_buffer_timer);
/* NB: unlike glXSwapBuffers, glXCopySubBuffer and
* glBlitFramebuffer don't issue an implicit glFlush() so we
* have to flush ourselves if we want the request to complete in
* finite amount of time since otherwise the driver can batch
* the command indefinitely. */
glFlush ();
}
else
{