From 55af335968a141c5d7ac1511c308712d61bf6738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 17 May 2009 17:14:01 +0000 Subject: [PATCH] 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 --- scene_opengl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index e15e1b04ff..3bcc1f27ee 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -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();