kwin: cleaning up the GLTexture API

This commit is contained in:
Philipp Knechtges 2012-01-07 22:26:50 +01:00
parent ca8484eff7
commit f5b5e5c8d0
6 changed files with 2 additions and 46 deletions

View file

@ -371,19 +371,6 @@ bool GLTexture::isDirty() const
return d->m_markedDirty;
}
void GLTexture::setTexture(GLuint texture)
{
discard();
Q_D(GLTexture);
d->m_texture = texture;
}
void GLTexture::setTarget(GLenum target)
{
Q_D(GLTexture);
d->m_target = target;
}
void GLTexture::setFilter(GLenum filter)
{
Q_D(GLTexture);
@ -516,15 +503,4 @@ bool GLTexture::saturationSupported()
return GLTexturePrivate::sSaturationSupported;
}
void GLTexture::release()
{
Q_D(GLTexture);
d->release();
}
void GLTexturePrivate::release()
{
// nothing to do because we are not bound to any specific data
}
} // namespace KWin

View file

@ -72,30 +72,21 @@ public:
virtual void discard();
void bind();
void unbind();
/**
* Release the data which is bound to the texture.
* @since 4.8
**/
void release();
void render(QRegion region, const QRect& rect);
GLuint texture() const;
GLenum target() const;
GLenum filter() const;
virtual bool isDirty() const;
void setTexture(GLuint texture);
void setTarget(GLenum target);
bool isDirty() const;
void setFilter(GLenum filter);
void setWrapMode(GLenum mode);
virtual void setDirty();
void setDirty();
static bool NPOTTextureSupported();
static bool framebufferObjectSupported();
static bool saturationSupported();
protected:
QImage convertToGLFormat(const QImage& img) const;
QExplicitlySharedDataPointer<GLTexturePrivate> d_ptr;
GLTexture(GLTexturePrivate& dd);

View file

@ -41,7 +41,6 @@ public:
virtual void bind();
virtual void unbind();
virtual void release();
virtual void onDamage();
QImage convertToGLFormat(const QImage& img) const;

View file

@ -114,7 +114,6 @@ public:
TexturePrivate();
virtual ~TexturePrivate();
virtual void release();
virtual void onDamage();
#ifndef KWIN_HAVE_OPENGLES

View file

@ -248,10 +248,6 @@ void SceneOpenGL::Texture::findTarget()
d->m_target = GL_TEXTURE_2D;
}
void SceneOpenGL::TexturePrivate::release()
{
}
bool SceneOpenGL::Texture::load(const Pixmap& pix, const QSize& size,
int depth, QRegion region)
{

View file

@ -606,11 +606,6 @@ SceneOpenGL::TexturePrivate::TexturePrivate()
}
SceneOpenGL::TexturePrivate::~TexturePrivate()
{
release();
}
void SceneOpenGL::TexturePrivate::release()
{
if (m_glxpixmap != None) {
if (!options->glStrictBinding) {