Scene OpenGL paints window content only when mask does not contain PAINT_DECORATION_ONLY like XRender backend.

This could be the solution to the performance regression when starting effects at activation change.
CCBUG: 191694

svn path=/trunk/KDE/kdebase/workspace/; revision=969215
This commit is contained in:
Martin Gräßlin 2009-05-17 17:14:01 +00:00
parent 23db34e558
commit 55af335968

View file

@ -1441,9 +1441,12 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
WindowQuadList decoration = data.quads.select( WindowQuadDecoration );
// paint the content
prepareStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
renderQuads( mask, region, data.quads.select( WindowQuadContents ));
restoreStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
if ( !(mask & PAINT_DECORATION_ONLY) )
{
prepareStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
renderQuads( mask, region, data.quads.select( WindowQuadContents ));
restoreStates( Content, data.opacity * data.contents_opacity, data.brightness, data.saturation, data.shader );
}
texture.disableUnnormalizedTexCoords();
texture.unbind();