From 908ec070a945cc39392b200d9bf9ff292de365cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 30 Jan 2007 16:42:03 +0000 Subject: [PATCH] Discard vertices on size change. svn path=/branches/work/kwin_composite/; revision=628605 --- scene_opengl.cpp | 9 +++++++++ scene_opengl.h | 1 + 2 files changed, 10 insertions(+) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 7cf0b186e4..5d9137a242 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -610,6 +610,7 @@ void SceneOpenGL::windowGeometryShapeChanged( Toplevel* c ) Window& w = windows[ c ]; w.discardShape(); w.discardTexture(); + w.discardVertices(); } void SceneOpenGL::windowOpacityChanged( Toplevel* ) @@ -645,6 +646,7 @@ SceneOpenGL::Window::Window( Toplevel* c ) void SceneOpenGL::Window::free() { discardTexture(); + discardVertices(); } void SceneOpenGL::Window::requestVertexGrid(int maxquadsize) @@ -985,6 +987,13 @@ void SceneOpenGL::Window::discardTexture() texture = 0; } +void SceneOpenGL::Window::discardVertices() +{ + // Causes list of vertices to be recreated before next rendering pass + currentXResolution = -1; + currentYResolution = -1; +} + // paint the window void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintData data ) { diff --git a/scene_opengl.h b/scene_opengl.h index 8fa73106c2..63a0757079 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -81,6 +81,7 @@ class SceneOpenGL::Window void enableTexture(); void disableTexture(); void discardTexture(); + void discardVertices(); Window() {} // QMap sucks even in Qt4 /**