Do glFinish()/XSync() to make sure all painting has been also processed.
svn path=/branches/work/kwin_composite/; revision=608430
This commit is contained in:
parent
3374f1fbda
commit
a4d6273de0
1 changed files with 6 additions and 2 deletions
|
@ -74,9 +74,15 @@ void ShowFpsEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data
|
||||||
if( fps > MAX_TIME )
|
if( fps > MAX_TIME )
|
||||||
fps = MAX_TIME; // keep it the same height
|
fps = MAX_TIME; // keep it the same height
|
||||||
if( dynamic_cast< SceneOpenGL* >( scene ))
|
if( dynamic_cast< SceneOpenGL* >( scene ))
|
||||||
|
{
|
||||||
paintGL( fps );
|
paintGL( fps );
|
||||||
|
glFinish(); // make sure all rendering is done
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
paintX( fps );
|
paintX( fps );
|
||||||
|
XSync( display(), False ); // make sure all rendering is done
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowFpsEffect::paintGL( int fps )
|
void ShowFpsEffect::paintGL( int fps )
|
||||||
|
@ -208,8 +214,6 @@ void ShowFpsEffect::paintX( int fps )
|
||||||
void ShowFpsEffect::postPaintScreen()
|
void ShowFpsEffect::postPaintScreen()
|
||||||
{
|
{
|
||||||
effects->postPaintScreen();
|
effects->postPaintScreen();
|
||||||
if( dynamic_cast< SceneXrender* >( scene ))
|
|
||||||
XSync( display(), False ); // make sure all rendering is done
|
|
||||||
paints[ paints_pos ] = t.elapsed();
|
paints[ paints_pos ] = t.elapsed();
|
||||||
if( ++paints_pos == NUM_PAINTS )
|
if( ++paints_pos == NUM_PAINTS )
|
||||||
paints_pos = 0;
|
paints_pos = 0;
|
||||||
|
|
Loading…
Reference in a new issue