diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 8ad03971ec..9ac8b3bef8 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -998,46 +998,6 @@ GLTexture *SceneOpenGL::Window::getDecorationTexture() const return texture; } -void SceneOpenGL::Window::paintDecorations(const WindowPaintData &data, const QRegion ®ion) -{ - GLTexture *texture = getDecorationTexture(); - if (!texture) - return; - - const WindowQuadList quads = data.quads.select(WindowQuadDecoration); - paintDecoration(texture, Decoration, region, data, quads); -} - -void SceneOpenGL::Window::paintDecoration(GLTexture *texture, TextureType type, - const QRegion ®ion, const WindowPaintData &data, - const WindowQuadList &quads) -{ - if (!texture || quads.isEmpty()) - return; - - if (filter == ImageFilterGood) - texture->setFilter(GL_LINEAR); - else - texture->setFilter(GL_NEAREST); - - texture->setWrapMode(GL_CLAMP_TO_EDGE); - texture->bind(); - - prepareStates(type, data.opacity() * data.decorationOpacity(), data.brightness(), data.saturation(), data.screen()); - renderQuads(0, region, quads, texture, false); - restoreStates(type, data.opacity() * data.decorationOpacity(), data.brightness(), data.saturation()); - - texture->unbind(); - -#ifndef KWIN_HAVE_OPENGLES - 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); - } -#endif -} - void SceneOpenGL::Window::renderQuads(int, const QRegion& region, const WindowQuadList& quads, GLTexture *tex, bool normalized) { diff --git a/scene_opengl.h b/scene_opengl.h index e9ae9516ae..ff406b4194 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -209,7 +209,6 @@ protected: QMatrix4x4 transformation(int mask, const WindowPaintData &data) const; GLTexture *getDecorationTexture() const; - void paintDecoration(GLTexture *texture, TextureType type, const QRegion ®ion, const WindowPaintData &data, const WindowQuadList &quads); void renderQuads(int, const QRegion& region, const WindowQuadList& quads, GLTexture* tex, bool normalized); /** * @brief Prepare the OpenGL rendering state before the texture with @p type will be rendered. @@ -232,8 +231,6 @@ protected: **/ virtual void restoreStates(TextureType type, qreal opacity, qreal brightness, qreal saturation) = 0; - void paintDecorations(const WindowPaintData &data, const QRegion ®ion); - protected: SceneOpenGL *m_scene; bool m_hardwareClipping;