diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp index 6fb40c1000..f34d9db144 100644 --- a/libkwineffects/kwingltexture.cpp +++ b/libkwineffects/kwingltexture.cpp @@ -73,13 +73,13 @@ GLTexture::GLTexture(const QImage& image, GLenum target) GLTexture::GLTexture(const QPixmap& pixmap, GLenum target) : d_ptr(new GLTexturePrivate()) { - load(pixmap, target); + load(pixmap.toImage(), target); } GLTexture::GLTexture(const QString& fileName) : d_ptr(new GLTexturePrivate()) { - load(fileName); + load(QImage(fileName)); } GLTexture::GLTexture(int width, int height) @@ -305,20 +305,6 @@ void GLTexture::update(const QImage &image, const QPoint &offset, const QRect &s } } -bool GLTexture::load(const QPixmap& pixmap, GLenum target) -{ - if (pixmap.isNull()) - return false; - return load(pixmap.toImage(), target); -} - -bool GLTexture::load(const QString& fileName) -{ - if (fileName.isEmpty()) - return false; - return load(QImage(fileName)); -} - void GLTexture::discard() { d_ptr = new GLTexturePrivate(); diff --git a/libkwineffects/kwingltexture.h b/libkwineffects/kwingltexture.h index 85db24c187..02f1c00bdb 100644 --- a/libkwineffects/kwingltexture.h +++ b/libkwineffects/kwingltexture.h @@ -83,8 +83,6 @@ public: QMatrix4x4 matrix(TextureCoordinateType type) const; virtual bool load(const QImage& image, GLenum target = GL_TEXTURE_2D); - virtual bool load(const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D); - virtual bool load(const QString& fileName); void update(const QImage& image, const QPoint &offset = QPoint(0, 0), const QRect &src = QRect()); virtual void discard(); void bind();