From 383a5cee0b9336c2da7a160a62ec72676c86b09a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 6 Feb 2022 14:02:37 +0200 Subject: [PATCH] kwineffects: Remove GLRenderTarget::{attachTexture,detachTexture} They're unused and immutable render targets are easier to handle. --- src/libkwineffects/kwinglutils.cpp | 34 ------------------------------ src/libkwineffects/kwinglutils.h | 13 ------------ 2 files changed, 47 deletions(-) diff --git a/src/libkwineffects/kwinglutils.cpp b/src/libkwineffects/kwinglutils.cpp index 49a7c7e3d1..4350663832 100644 --- a/src/libkwineffects/kwinglutils.cpp +++ b/src/libkwineffects/kwinglutils.cpp @@ -1154,40 +1154,6 @@ void GLRenderTarget::blitFromFramebuffer(const QRect &source, const QRect &desti GLRenderTarget::popRenderTarget(); } -void GLRenderTarget::attachTexture(const GLTexture& target) -{ - if (!mValid) { - initFBO(); - } - - if (mTexture.texture() == target.texture()) { - return; - } - - pushRenderTarget(this); - - mTexture = target; - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - mTexture.target(), mTexture.texture(), 0); - - popRenderTarget(); -} - -void GLRenderTarget::detachTexture() -{ - if (mTexture.isNull()) { - return; - } - - pushRenderTarget(this); - - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - mTexture.target(), 0, 0); - - popRenderTarget(); -} - - // ------------------------------------------------------------------ static const uint16_t indices[] = { diff --git a/src/libkwineffects/kwinglutils.h b/src/libkwineffects/kwinglutils.h index fd8a84d6d5..f8dacec79b 100644 --- a/src/libkwineffects/kwinglutils.h +++ b/src/libkwineffects/kwinglutils.h @@ -415,19 +415,6 @@ public: */ bool disable(); - /** - * Sets the target texture - * @param target texture where the scene will be rendered on - * @since 4.8 - */ - void attachTexture(const GLTexture& target); - - /** - * Detaches the texture that is currently attached to this framebuffer object. - * @since 5.13 - */ - void detachTexture(); - bool valid() const { return mValid; }