Discard vertices on size change.

svn path=/branches/work/kwin_composite/; revision=628605
This commit is contained in:
Luboš Luňák 2007-01-30 16:42:03 +00:00
parent 43d393429d
commit 908ec070a9
2 changed files with 10 additions and 0 deletions

View file

@ -610,6 +610,7 @@ void SceneOpenGL::windowGeometryShapeChanged( Toplevel* c )
Window& w = windows[ c ]; Window& w = windows[ c ];
w.discardShape(); w.discardShape();
w.discardTexture(); w.discardTexture();
w.discardVertices();
} }
void SceneOpenGL::windowOpacityChanged( Toplevel* ) void SceneOpenGL::windowOpacityChanged( Toplevel* )
@ -645,6 +646,7 @@ SceneOpenGL::Window::Window( Toplevel* c )
void SceneOpenGL::Window::free() void SceneOpenGL::Window::free()
{ {
discardTexture(); discardTexture();
discardVertices();
} }
void SceneOpenGL::Window::requestVertexGrid(int maxquadsize) void SceneOpenGL::Window::requestVertexGrid(int maxquadsize)
@ -985,6 +987,13 @@ void SceneOpenGL::Window::discardTexture()
texture = 0; texture = 0;
} }
void SceneOpenGL::Window::discardVertices()
{
// Causes list of vertices to be recreated before next rendering pass
currentXResolution = -1;
currentYResolution = -1;
}
// paint the window // paint the window
void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintData data ) void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintData data )
{ {

View file

@ -81,6 +81,7 @@ class SceneOpenGL::Window
void enableTexture(); void enableTexture();
void disableTexture(); void disableTexture();
void discardTexture(); void discardTexture();
void discardVertices();
Window() {} // QMap sucks even in Qt4 Window() {} // QMap sucks even in Qt4
/** /**