Reactivating the use of a gl list for painting the cube. The cube is painted once without using the gl list. By that the problem of black windows on other desktops should be solved. If the black window problem appears again the patch will be reverted.
CCBUG: 183905 svn path=/trunk/KDE/kdebase/workspace/; revision=929840
This commit is contained in:
parent
eae6279ca9
commit
a6d8bb41bb
2 changed files with 46 additions and 12 deletions
|
@ -315,6 +315,16 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
|||
glPopMatrix();
|
||||
}
|
||||
|
||||
// compile List for cube
|
||||
if( useList )
|
||||
{
|
||||
glNewList( glList + 1, GL_COMPILE );
|
||||
glPushMatrix();
|
||||
paintCube( mask, region, data );
|
||||
glPopMatrix();
|
||||
glEndList();
|
||||
}
|
||||
|
||||
QRect rect = effects->clientArea( FullScreenArea, activeScreen, effects->currentDesktop());
|
||||
if( effects->numScreens() > 1 && bigCube )
|
||||
rect = effects->clientArea( FullArea, activeScreen, effects->currentDesktop() );
|
||||
|
@ -443,9 +453,14 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
|||
}
|
||||
glPushMatrix();
|
||||
glCallList( glList );
|
||||
if( useList )
|
||||
glCallList( glList + 1 );
|
||||
else
|
||||
{
|
||||
glPushMatrix();
|
||||
paintCube( mask, region, data );
|
||||
glPopMatrix();
|
||||
}
|
||||
glPopMatrix();
|
||||
glCullFace( GL_BACK );
|
||||
if( mode == Cylinder )
|
||||
|
@ -456,9 +471,14 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
|||
}
|
||||
glPushMatrix();
|
||||
glCallList( glList );
|
||||
if( useList )
|
||||
glCallList( glList + 1 );
|
||||
else
|
||||
{
|
||||
glPushMatrix();
|
||||
paintCube( mask, region, data );
|
||||
glPopMatrix();
|
||||
}
|
||||
glPopMatrix();
|
||||
|
||||
// cap
|
||||
|
@ -552,9 +572,14 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
|||
}
|
||||
glPushMatrix();
|
||||
glCallList( glList );
|
||||
if( useList )
|
||||
glCallList( glList + 1 );
|
||||
else
|
||||
{
|
||||
glPushMatrix();
|
||||
paintCube( mask, region, data );
|
||||
glPopMatrix();
|
||||
}
|
||||
glPopMatrix();
|
||||
glCullFace( GL_FRONT );
|
||||
if( mode == Cylinder )
|
||||
|
@ -571,10 +596,17 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
|
|||
}
|
||||
glPushMatrix();
|
||||
glCallList( glList );
|
||||
if( useList )
|
||||
glCallList( glList + 1 );
|
||||
else
|
||||
{
|
||||
glPushMatrix();
|
||||
paintCube( mask, region, data );
|
||||
glPopMatrix();
|
||||
}
|
||||
glPopMatrix();
|
||||
// we painted once without glList, now it's safe to paint using lists
|
||||
useList = true;
|
||||
|
||||
// cap
|
||||
if( paintCaps && ( effects->numberOfDesktops() >= 2 ))
|
||||
|
@ -1976,6 +2008,7 @@ void CubeEffect::setActive( bool active )
|
|||
glList = glGenLists(3);
|
||||
capListCreated = false;
|
||||
recompileList = true;
|
||||
useList = false;
|
||||
// create the capList
|
||||
if( paintCaps )
|
||||
paintCap();
|
||||
|
|
|
@ -147,6 +147,7 @@ class CubeEffect
|
|||
float capDeformationFactor;
|
||||
bool useZOrdering;
|
||||
float zOrderingFactor;
|
||||
bool useList;
|
||||
|
||||
// GL lists
|
||||
bool capListCreated;
|
||||
|
|
Loading…
Reference in a new issue