kwin/libkwineffects
David Edmundson d1cfcf4c97 Avoid texture bleed rendering X11 window
Summary:
We currently see a gap on transformed windows between the window and the
top decoration.

This is partly the atlas bleed on the decoration, and partly a bleed on
the window content itself.

On X11, the window we composite is the frame window - which is a larger
texture containing a transparent border where the frame normally would
be. When we sample with a linear filter we include these texels. Hence
GL_CLAMP_TO_EDGE doesn't work.

Vlad's patch to composite the correct window, not the frame was my
preferred approach, but we had to revert it as it caused an issue with
xwayland :(

Half pixel correction nearly worked, but caused blurry fonts.

This patch resolves it in the fragment shader used by effects doing
transforms. We pass the real texture geometry of the window to the
client with a half pixel correction. Any samples outside the outer half
pixel are then clamped within bounds.

Arguably a hack, but solves the problem in a comparatively
non-invasive way.

BUG: 360549
BUG: 257566

Test Plan:
X11:
Using Vlad's atlas padding for decoration
Slowed animations, wobbled a dark window over a light background
No artifacts

Wayland:
This isn't needed. Now tested that everything still renders the same.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, jgrulich, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25737
2020-01-09 13:03:48 +00:00
..
anidata.cpp Add some const & 2019-10-30 19:23:01 +01:00
anidata_p.h Add some const & 2019-10-30 19:23:01 +01:00
CMakeLists.txt [libkwineffects] Introduce API to easily show a QtQuick scene in an effect 2019-09-27 16:11:05 +01:00
kwinanimationeffect.cpp Add some const & 2019-10-30 19:23:01 +01:00
kwinanimationeffect.h Add some const & 2019-10-30 19:23:01 +01:00
kwinconfig.h.cmake Move linking to DL_LIBRARY to x11standalone platform 2016-11-22 14:22:06 +01:00
kwineffectquickview.cpp [effects] Forward wheel events 2019-11-14 12:50:45 +00:00
kwineffectquickview.h [libkwineffects] Introduce API to easily show a QtQuick scene in an effect 2019-09-27 16:11:05 +01:00
kwineffects.cpp [effects] Add effect to hold the desktop window static after plasmashell quits 2019-11-01 17:14:55 +00:00
kwineffects.h [libkwineffects] Expose frame and buffer geometry to effects 2019-11-27 14:12:30 +02:00
kwinglobals.h [effects] Add effect to hold the desktop window static after plasmashell quits 2019-11-01 17:14:55 +00:00
kwinglplatform.cpp Add some const & 2019-10-30 19:23:01 +01:00
kwinglplatform.h Add support for virgl in GLPlatform 2019-10-29 20:57:02 +01:00
kwingltexture.cpp Merge branch 'Plasma/5.17' 2019-11-18 12:27:17 +02:00
kwingltexture.h Merge branch 'Plasma/5.17' 2019-11-18 12:27:17 +02:00
kwingltexture_p.h KWin::GLTexture support external textures 2019-09-25 14:28:19 +01:00
kwinglutils.cpp Avoid texture bleed rendering X11 window 2020-01-09 13:03:48 +00:00
kwinglutils.h Avoid texture bleed rendering X11 window 2020-01-09 13:03:48 +00:00
kwinglutils_funcs.cpp Add some const & 2019-10-30 19:23:01 +01:00
kwinglutils_funcs.h Add some const & 2019-10-30 19:23:01 +01:00
kwinxrenderutils.cpp Port away from deprecated QImage::byteCount 2019-07-10 02:02:15 +03:00
kwinxrenderutils.h Use more traditional doxygen style 2019-07-29 22:06:19 +03:00
logging.cpp pedantic fixes 2016-07-16 13:14:44 -04:00
logging_p.h pedantic fixes 2016-07-16 13:14:44 -04:00
Mainpage.dox
Messages.sh