stage-glx: Never promote clipped redraws to full redraws.

When clipped redraws were first supported in Clutter a heuristic was
added to promote tall clipped redraws into full redraws due to a concern
that using glXCopySubBuffer for tall rectangles would block the GPU for
too long waiting for the vtrace to be in a suitable position so that
tearing isn't seen. We've so far been unable to measure any impact from
this blocking even with full height windows so we are removing the
arbitrary threshold of 300px that was originally "plucked out of thin
air".

http://bugzilla.o-hand.com/show_bug.cgi?id=2136
This commit is contained in:
Robert Bragg 2010-06-09 02:42:01 +01:00
parent 5382e8722b
commit 56315d92bd

View File

@ -405,13 +405,6 @@ clutter_stage_glx_add_redraw_clip (ClutterStageWindow *stage_window,
&stage_glx->bounding_redraw_clip);
}
/* FIXME: This threshold was plucked out of thin air! */
if (stage_glx->bounding_redraw_clip.height > 300)
{
/* Set a degenerate clip to force a full redraw */
stage_glx->bounding_redraw_clip.width = 0;
}
#if 0
redraw_area = (stage_glx->bounding_redraw_clip.width *
stage_glx->bounding_redraw_clip.height);
@ -694,7 +687,8 @@ clutter_stage_glx_redraw (ClutterStageGLX *stage_glx,
if (clutter_feature_available (CLUTTER_FEATURE_SWAP_EVENTS))
stage_glx->pending_swaps++;
if (backend_glx->vblank_type != CLUTTER_VBLANK_GLX_SWAP)
if (backend_glx->vblank_type != CLUTTER_VBLANK_GLX_SWAP &&
backend_glx->vblank_type != CLUTTER_VBLANK_NONE)
{
/* If we are going to wait for VBLANK manually, we not only
* need to flush out pending drawing to the GPU before we