Bug 459417 - Invert effect is not applied when animations are running
Summary: Invert effect is not applied when animations are running
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: 5.25.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 461002 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-20 00:59 UTC by andriy.parhomenko
Modified: 2022-10-26 19:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.27
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andriy.parhomenko 2022-09-20 00:59:56 UTC
After update to Plasma 5.25.90 Invert effect stopped working during animations. Looks like WindowPaintData::shader is not applied during animation effects running.


STEPS TO REPRODUCE
1. Turn on Invert effect
2. Turn on Wobbly Windows or Magic Lamp
3. Move or minimize a window

OBSERVED RESULT
Invert effect is not applied while its animation is running.

EXPECTED RESULT
Effect is applied during animations.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Ubuntu 22.10
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98
Qt Version: 5.15.4

ADDITIONAL INFORMATION
I maintain a fork of LightlyShaders, a window rounding effect, which now relies on WindowPaintData::shader, like the Invert effect also does, and it stopped working during animations in Plasma 5.25.90 as well.
Comment 1 Nate Graham 2022-09-22 18:56:19 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2022-10-25 11:52:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3112
Comment 3 Arjen Hiemstra 2022-10-26 13:36:16 UTC
Git commit 4c8fd4b8ca3d43cb4976f19291073f39783e5bae by Arjen Hiemstra.
Committed on 26/10/2022 at 11:50.
Pushed by ahiemstra into branch 'master'.

OffscreenEffect: Use drawWindow instead of renderWindow when rendering contents

renderWindow bypasses all other effects and simply calls the code that
is responsible for the final render of the window. This means that any
effects that are active on the window are skipped, including things that
may change how the window is rendered like the invert effect. To fix
that, ensure we render the window with all effects applied.

M  +1    -1    src/libkwineffects/kwinoffscreeneffect.cpp

https://invent.kde.org/plasma/kwin/commit/4c8fd4b8ca3d43cb4976f19291073f39783e5bae
Comment 4 Nate Graham 2022-10-26 19:01:02 UTC
*** Bug 461002 has been marked as a duplicate of this bug. ***