Bug 385924 - SubSurface rendering results in flickering if window stacked above
Summary: SubSurface rendering results in flickering if window stacked above
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: 5.11.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://phabricator.kde.org/D8369
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 18:38 UTC by Dennis Schridde
Modified: 2017-11-25 16:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.3
mgraesslin: Wayland+
mgraesslin: X11-
mgraesslin: ReviewRequest+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2017-10-18 18:38:49 UTC
Every window, including tooltips and the KMail About window, but also Firefox or Yakuake, don't render when dragged above the KMail window.  As soon as they are moved outside the KMail window region, they render fine.  The window decorations are rendered properly, but I only see the contents of the KMail window, instead of the window that is actually on top.  When moving the mouse cursor over the invisible window, parts of its contents are flickering through the KMail window.

Wayland: 1.14.0
Wayland protocols: 1.11
KDE Frameworks: 5.39.0
Plasma: 5.11.1
KDE Apps: 17.08.2
Mesa: 17.2.2
Linux: 4.13.5 (Gentoo)

glxinfo: https://bugs.kde.org/attachment.cgi?id=108442
eglinfo: https://bugs.kde.org/attachment.cgi?id=108441
Comment 1 Dennis Schridde 2017-10-18 18:57:57 UTC
This seems to happen only when KMail was started from the shell, which runs in Yakuake.
Comment 2 Dennis Schridde 2017-10-18 18:59:24 UTC
(In reply to Dennis Schridde from comment #1)
> This seems to happen only when KMail was started from the shell, which runs
> in Yakuake.

Sorry, after popping up Yakuake, this happens again, even for the KMail which was not started to Yakuake.  So it seems not to be related to how KMail was started, but to whether Yakuake showed up afterwards or not.
Comment 3 Dennis Schridde 2017-10-18 19:12:41 UTC
Qt: 5.9.2
Comment 4 Martin Flöser 2017-10-19 04:19:31 UTC
I assume it's our rendering issue for sub surfaces.
Comment 5 Martin Flöser 2017-10-19 15:31:32 UTC
I just started kmail and can verify the behavior. Looks a lot like the known subsurface rendering issue.
Comment 6 Martin Flöser 2017-10-19 19:12:39 UTC
Possible patch at: https://phabricator.kde.org/D8369

I spent days on this issue in the past without seeing the obvious m(
Comment 7 Martin Flöser 2017-10-31 09:35:39 UTC
Git commit d71792378e9aa9c99874092fda151bc66efa3df8 by Martin Flöser.
Committed on 31/10/2017 at 09:35.
Pushed by graesslin into branch 'Plasma/5.11'.

Fix rendering issues of subsurfaces by using proper clipping

Summary:
Rendering subsurfaces in the OpenGL compositor has always resulted in
flickering when a subsurface gets repainted and there is a window on top
of it. Looking at the code this is rather obvious: the clipping of the
main window is ignored and the complete subsurface is rendered as is and
thus also rendering above windows where it should not render.

This change passes the clip region and whether hardware clipping is used
to the rendering of subsurfaces which in turn uses it for rendering the
texture.
FIXED-IN: 5.11.3

Test Plan:
Opened systemsettings, went to decoration KCM, put a window
partially above and scrolled. Without change: strong flicker, with change:
no flicker.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8369

M  +4    -4    scene_opengl.cpp

https://commits.kde.org/kwin/d71792378e9aa9c99874092fda151bc66efa3df8
Comment 8 Rainer Finke 2017-11-25 10:32:07 UTC
I know this bug has been closed, so I might miss some updates, but I still have this issue at least with Kmail on Wayland in the following cases:
1.) Open fullscreen Kmail and move the mouse up and down in the menu e.g. in Files => flickering of the menu window
2.) Open fullscreen Kmail and then afterwards another fullscreen application e.g. Kate. Then either move the mouse e.g. into certain areas of the plasma panel or near the close button (not always the same), or just open in Kate e.g. the Files menu then you will see Kmail instead of Kate. => flickering and wrong application surface

Plasma 5.11.3
KDE Frameworks 5.40
KDE Applications 17.11.80
Qt 5.10 beta 4 (compiled with 5.9.2)
Arch Linux 4.14

For reference I opened some time ago the bug https://bugs.kde.org/show_bug.cgi?id=385678, but I didn't get any response. If I should open another bug report for kwin, please let me know. Thanks
Comment 9 Martin Flöser 2017-11-25 16:48:08 UTC
Please report as a new bug report, so that we can properly track.