graesslin created this revision. graesslin added reviewers: KWin, Plasma. Restricted Application added a project: KWin. Restricted Application added subscribers: kwin, plasma-devel.
REVISION 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. BUG: 385924 FIXED-IN: 5.11.2 TEST PLAN Opened systemsettings, went to decoration KCM, put a window partially above and scrolled. Without change: strong flicker, with change: no flicker. REPOSITORY R108 KWin BRANCH fix-clipping-subsurfaces-5.11 REVISION DETAIL https://phabricator.kde.org/D8369 AFFECTED FILES scene_opengl.cpp To: graesslin, #kwin, #plasma Cc: plasma-devel, kwin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart