kwineffects: Remove dead code

AnimationEffect sets the clip region to clip windows, so this code can
be safely removed.
This commit is contained in:
Vlad Zahorodnii 2021-06-10 13:50:06 +03:00
parent 40c485f2a6
commit 3ae400772b
2 changed files with 0 additions and 46 deletions

View file

@ -447,49 +447,6 @@ QRect AnimationEffect::clipRect(const QRect &geo, const AniData &anim) const
return clip;
}
void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, WindowQuadList &quads) const
{
return;
const QRect geo = w->expandedGeometry();
QRect clip = AnimationEffect::clipRect(geo, anim);
WindowQuadList filtered;
if (clip.left() != geo.left()) {
quads = quads.splitAtX(clip.left());
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.right() >= clip.left())
filtered << quad;
}
quads = filtered;
filtered.clear();
}
if (clip.right() != geo.right()) {
quads = quads.splitAtX(clip.left());
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.right() <= clip.right())
filtered << quad;
}
quads = filtered;
filtered.clear();
}
if (clip.top() != geo.top()) {
quads = quads.splitAtY(clip.top());
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.top() >= clip.top())
filtered << quad;
}
quads = filtered;
filtered.clear();
}
if (clip.bottom() != geo.bottom()) {
quads = quads.splitAtY(clip.bottom());
Q_FOREACH (const WindowQuad &quad, quads) {
if (quad.bottom() <= clip.bottom())
filtered << quad;
}
quads = filtered;
}
}
void AnimationEffect::disconnectGeometryChanges()
{
disconnect(effects, &EffectsHandler::windowExpandedGeometryChanged,
@ -513,8 +470,6 @@ void AnimationEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data,
data.setTranslucent();
else if (!(anim->attribute == Brightness || anim->attribute == Saturation)) {
data.setTransformed();
if (anim->attribute == Clip)
clipWindow(w, *anim, data.quads);
}
paintDeleted |= anim->keepAlive;

View file

@ -377,7 +377,6 @@ protected:
private:
quint64 p_animate(EffectWindow *w, Attribute a, uint meta, int ms, FPx2 to, const QEasingCurve &curve, int delay, FPx2 from, bool keepAtTarget, bool fullScreenEffect, bool keepAlive);
QRect clipRect(const QRect &windowRect, const AniData&) const;
void clipWindow(const EffectWindow *, const AniData &, WindowQuadList &) const;
float interpolated( const AniData&, int i = 0 ) const;
float progress( const AniData& ) const;
void disconnectGeometryChanges();