Remove SceneOpenGL::Window::paintDecoration()
Leftover from the OpenGL 1.x backend.
This commit is contained in:
parent
10120c6d42
commit
c9aacbc460
2 changed files with 0 additions and 43 deletions
|
@ -998,46 +998,6 @@ GLTexture *SceneOpenGL::Window::getDecorationTexture() const
|
||||||
return texture;
|
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,
|
void SceneOpenGL::Window::renderQuads(int, const QRegion& region, const WindowQuadList& quads,
|
||||||
GLTexture *tex, bool normalized)
|
GLTexture *tex, bool normalized)
|
||||||
{
|
{
|
||||||
|
|
|
@ -209,7 +209,6 @@ protected:
|
||||||
|
|
||||||
QMatrix4x4 transformation(int mask, const WindowPaintData &data) const;
|
QMatrix4x4 transformation(int mask, const WindowPaintData &data) const;
|
||||||
GLTexture *getDecorationTexture() 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);
|
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.
|
* @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;
|
virtual void restoreStates(TextureType type, qreal opacity, qreal brightness, qreal saturation) = 0;
|
||||||
|
|
||||||
void paintDecorations(const WindowPaintData &data, const QRegion ®ion);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SceneOpenGL *m_scene;
|
SceneOpenGL *m_scene;
|
||||||
bool m_hardwareClipping;
|
bool m_hardwareClipping;
|
||||||
|
|
Loading…
Reference in a new issue