diff --git a/src/effects.cpp b/src/effects.cpp index c3aadb95f1..23bf425a10 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -2281,16 +2281,6 @@ void EffectWindowImpl::closeWindow() } } -void EffectWindowImpl::referencePreviousWindowPixmap() -{ - // TODO: Implement. -} - -void EffectWindowImpl::unreferencePreviousWindowPixmap() -{ - // TODO: Implement. -} - bool EffectWindowImpl::isManaged() const { return managed; diff --git a/src/effects.h b/src/effects.h index 46ddae7c26..63fdcc95f3 100644 --- a/src/effects.h +++ b/src/effects.h @@ -479,9 +479,6 @@ public: void unminimize() override; void closeWindow() override; - void referencePreviousWindowPixmap() override; - void unreferencePreviousWindowPixmap() override; - QWindow *internalWindow() const override; const Window *window() const; diff --git a/src/libkwineffects/anidata.cpp b/src/libkwineffects/anidata.cpp index 8f83aac0b9..d04e7b44d6 100644 --- a/src/libkwineffects/anidata.cpp +++ b/src/libkwineffects/anidata.cpp @@ -31,21 +31,6 @@ FullScreenEffectLock::~FullScreenEffectLock() effects->setActiveFullScreenEffect(nullptr); } -PreviousWindowPixmapLock::PreviousWindowPixmapLock(EffectWindow *w) - : m_window(w) -{ - m_window->referencePreviousWindowPixmap(); -} - -PreviousWindowPixmapLock::~PreviousWindowPixmapLock() -{ - m_window->unreferencePreviousWindowPixmap(); - - // Add synthetic repaint to prevent glitches after cross-fading - // translucent windows. - effects->addRepaint(m_window->expandedGeometry().toAlignedRect()); -} - AniData::AniData() : attribute(AnimationEffect::Opacity) , customCurve(0) // Linear @@ -60,7 +45,7 @@ AniData::AniData() AniData::AniData(AnimationEffect::Attribute a, int meta_, const FPx2 &to_, int delay, const FPx2 &from_, bool waitAtSource_, FullScreenEffectLockPtr fullScreenEffectLock_, bool keepAlive, - PreviousWindowPixmapLockPtr previousWindowPixmapLock_, GLShader *shader) + GLShader *shader) : attribute(a) , from(from_) , to(to_) @@ -70,7 +55,6 @@ AniData::AniData(AnimationEffect::Attribute a, int meta_, const FPx2 &to_, , fullScreenEffectLock(std::move(fullScreenEffectLock_)) , waitAtSource(waitAtSource_) , keepAlive(keepAlive) - , previousWindowPixmapLock(std::move(previousWindowPixmapLock_)) , shader(shader) { } diff --git a/src/libkwineffects/anidata_p.h b/src/libkwineffects/anidata_p.h index 77b1f2a72a..e20458b006 100644 --- a/src/libkwineffects/anidata_p.h +++ b/src/libkwineffects/anidata_p.h @@ -31,21 +31,6 @@ private: }; typedef QSharedPointer FullScreenEffectLockPtr; -/** - * References the previous window pixmap to prevent discarding. - */ -class PreviousWindowPixmapLock -{ -public: - PreviousWindowPixmapLock(EffectWindow *w); - ~PreviousWindowPixmapLock(); - -private: - EffectWindow *m_window; - Q_DISABLE_COPY(PreviousWindowPixmapLock) -}; -typedef QSharedPointer PreviousWindowPixmapLockPtr; - class KWINEFFECTS_EXPORT AniData { public: @@ -53,7 +38,7 @@ public: AniData(AnimationEffect::Attribute a, int meta, const FPx2 &to, int delay, const FPx2 &from, bool waitAtSource, FullScreenEffectLockPtr = FullScreenEffectLockPtr(), - bool keepAlive = true, PreviousWindowPixmapLockPtr previousWindowPixmapLock = {}, GLShader *shader = nullptr); + bool keepAlive = true, GLShader *shader = nullptr); bool isActive() const; @@ -76,7 +61,6 @@ public: bool keepAlive; EffectWindowDeletedRef deletedRef; EffectWindowVisibleRef visibleRef; - PreviousWindowPixmapLockPtr previousWindowPixmapLock; AnimationEffect::TerminationFlags terminationFlags; GLShader *shader{nullptr}; }; diff --git a/src/libkwineffects/kwinanimationeffect.cpp b/src/libkwineffects/kwinanimationeffect.cpp index dcad5fc16f..1cb30d8062 100644 --- a/src/libkwineffects/kwinanimationeffect.cpp +++ b/src/libkwineffects/kwinanimationeffect.cpp @@ -232,7 +232,6 @@ quint64 AnimationEffect::p_animate(EffectWindow *w, Attribute a, uint meta, int } } - PreviousWindowPixmapLockPtr previousPixmap; if (a == CrossFadePrevious) { CrossFadeEffect::redirect(w); } @@ -246,7 +245,6 @@ quint64 AnimationEffect::p_animate(EffectWindow *w, Attribute a, uint meta, int waitAtSource, // Whether the animation should be kept at source fullscreen, // Full screen effect lock keepAlive, // Keep alive flag - previousPixmap, // Previous window pixmap lock shader )); diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index 4fd90680f8..2dea3ce4d9 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -2654,35 +2654,6 @@ public: Q_SCRIPTABLE virtual void setData(int role, const QVariant &data) = 0; Q_SCRIPTABLE virtual QVariant data(int role) const = 0; - /** - * @brief References the previous window pixmap to prevent discarding. - * - * This method allows to reference the previous window pixmap in case that a window changed - * its size, which requires a new window pixmap. By referencing the previous (and then outdated) - * window pixmap an effect can for example cross fade the current window pixmap with the previous - * one. This allows for smoother transitions for window geometry changes. - * - * If an effect calls this method on a window it also needs to call unreferencePreviousWindowPixmap - * once it does no longer need the previous window pixmap. - * - * Note: the window pixmap is not kept forever even when referenced. If the geometry changes again, so that - * a new window pixmap is created, the previous window pixmap will be exchanged with the current one. This - * means it's still possible to have rendering glitches. An effect is supposed to track for itself the changes - * to the window's geometry and decide how the transition should continue in such a situation. - * - * @see unreferencePreviousWindowPixmap - * @since 4.11 - */ - virtual void referencePreviousWindowPixmap() = 0; - /** - * @brief Unreferences the previous window pixmap. Only relevant after referencePreviousWindowPixmap had - * been called. - * - * @see referencePreviousWindowPixmap - * @since 4.11 - */ - virtual void unreferencePreviousWindowPixmap() = 0; - protected: friend EffectWindowVisibleRef; virtual void refVisible(const EffectWindowVisibleRef *holder) = 0;