diff --git a/src/libkwineffects/kwinglutils.cpp b/src/libkwineffects/kwinglutils.cpp index 4350663832..c39fdb13f3 100644 --- a/src/libkwineffects/kwinglutils.cpp +++ b/src/libkwineffects/kwinglutils.cpp @@ -1008,10 +1008,6 @@ GLRenderTarget::~GLRenderTarget() bool GLRenderTarget::enable() { - if (!mValid) { - initFBO(); - } - if (!valid()) { qCCritical(LIBKWINGLUTILS) << "Can't enable invalid render target!"; return false; @@ -1026,10 +1022,6 @@ bool GLRenderTarget::enable() bool GLRenderTarget::disable() { - if (!mValid) { - initFBO(); - } - if (!valid()) { qCCritical(LIBKWINGLUTILS) << "Can't disable invalid render target!"; return false; @@ -1131,14 +1123,10 @@ void GLRenderTarget::initFBO() void GLRenderTarget::blitFromFramebuffer(const QRect &source, const QRect &destination, GLenum filter) { - if (!GLRenderTarget::blitSupported()) { + if (!valid()) { return; } - if (!mValid) { - initFBO(); - } - GLRenderTarget::pushRenderTarget(this); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFramebuffer); glBindFramebuffer(GL_READ_FRAMEBUFFER, s_kwinFramebuffer);