diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 37dc75eeba..c132ebfdcc 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -141,7 +141,7 @@ SceneOpenGL::SceneOpenGL(Workspace* ws, OpenGLBackend *backend) glDrawBuffer(GL_BACK); #endif - debug = qstrcmp(qgetenv("KWIN_GL_DEBUG"), "1") == 0; + m_debug = qstrcmp(qgetenv("KWIN_GL_DEBUG"), "1") == 0; // set strict binding if (options->isGlStrictBindingFollowsDriver()) { @@ -1131,7 +1131,7 @@ void SceneOpenGL::Window::performPaint(int mask, QRegion region, WindowPaintData restoreStates(Content, data.opacity(), data.brightness(), data.saturation()); m_texture->unbind(); #ifndef KWIN_HAVE_OPENGLES - if (m_scene && m_scene->debug) { + if (m_scene && m_scene->debug()) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); renderQuads(mask, region, contentQuads, m_texture, false); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); @@ -1234,7 +1234,7 @@ void SceneOpenGL::Window::paintDecoration(GLTexture *texture, TextureType type, texture->unbind(); #ifndef KWIN_HAVE_OPENGLES - if (m_scene && m_scene->debug) { + if (m_scene && m_scene->debug()) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); GLVertexBuffer::streamingBuffer()->render(region, GL_TRIANGLES, m_hardwareClipping); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); @@ -1282,7 +1282,7 @@ void SceneOpenGL::Window::paintShadow(const QRegion ®ion, const WindowPaintDa restoreStates(Shadow, data.opacity(), data.brightness(), data.saturation()); texture->unbind(); #ifndef KWIN_HAVE_OPENGLES - if (m_scene && m_scene->debug) { + if (m_scene && m_scene->debug()) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); renderQuads(0, region, quads, texture, true); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); diff --git a/scene_opengl.h b/scene_opengl.h index 72601fda7a..0e65e9735e 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -56,6 +56,8 @@ public: void idle(); + bool debug() const { return m_debug; } + /** * @brief Factory method to create a backend specific texture. * @@ -98,7 +100,7 @@ private: bool viewportLimitsMatched(const QSize &size) const; private: QHash< Toplevel*, Window* > windows; - bool debug; + bool m_debug; OpenGLBackend *m_backend; };