effect/animationeffect: use ItemEffect to prevent direct scanout where applicable

This commit is contained in:
Xaver Hugl 2024-08-05 17:32:25 +02:00
parent 2a5716e782
commit e48b7b77ec
2 changed files with 4 additions and 0 deletions

View file

@ -13,6 +13,7 @@
#include "effect/animationeffect.h"
#include "effect/effectwindow.h"
#include "effect/timeline.h"
#include "scene/item.h"
#include <QEasingCurve>
@ -64,6 +65,7 @@ public:
EffectWindowVisibleRef visibleRef;
AnimationEffect::TerminationFlags terminationFlags;
GLShader *shader{nullptr};
ItemEffect itemEffect;
};
} // namespace

View file

@ -13,6 +13,7 @@
#include "effect/effecthandler.h"
#include "opengl/glshader.h"
#include "opengl/glshadermanager.h"
#include "scene/windowitem.h"
#include <QDateTime>
#include <QTimer>
@ -263,6 +264,7 @@ quint64 AnimationEffect::p_animate(EffectWindow *w, Attribute a, uint meta, int
animation.timeLine.setEasingCurve(curve);
animation.timeLine.setSourceRedirectMode(TimeLine::RedirectMode::Strict);
animation.timeLine.setTargetRedirectMode(TimeLine::RedirectMode::Relaxed);
animation.itemEffect = ItemEffect(w->windowItem());
animation.terminationFlags = TerminateAtSource;
if (!keepAtTarget) {