From 210df22b17db6647e73fd2720ccf6a110d8c42af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sun, 13 Apr 2014 20:42:47 +0200 Subject: [PATCH] Remove SceneOpenGL::Texture::load(QPixmap) Fold it into the constructor, since that's the only place where it's called. --- scene_opengl.cpp | 10 +--------- scene_opengl.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 0d862350a7..1b2dd37c9b 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -757,7 +757,7 @@ SceneOpenGL::Texture::Texture(OpenGLBackend *backend) SceneOpenGL::Texture::Texture(OpenGLBackend *backend, const QPixmap &pix, GLenum target) : GLTexture(*backend->createBackendTexture(this)) { - load(pix, target); + GLTexture::load(pix.toImage(), target); } SceneOpenGL::Texture::~Texture() @@ -787,14 +787,6 @@ bool SceneOpenGL::Texture::load(xcb_pixmap_t pix, const QSize &size, int depth) return d->loadTexture(pix, size, depth); } -bool SceneOpenGL::Texture::load(const QPixmap& pixmap, GLenum target) -{ - if (pixmap.isNull()) - return false; - - return GLTexture::load(pixmap.toImage(), target); -} - void SceneOpenGL::Texture::findTarget() { Q_D(Texture); diff --git a/scene_opengl.h b/scene_opengl.h index 8e258ce721..0d94855a69 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -166,7 +166,6 @@ public: Texture & operator = (const Texture& tex); using GLTexture::load; - virtual bool load(const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D); virtual void discard(); bool update(const QRegion &damage);