Bug 457817 - WindowHeap-based effects have low window preview quality due to cheap / fast scaling algorithm
Summary: WindowHeap-based effects have low window preview quality due to cheap / fast ...
Status: RESOLVED DUPLICATE of bug 422117
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: 5.24.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
Depends on:
Reported: 2022-08-12 22:53 UTC by Adam Fontenot
Modified: 2023-09-12 17:06 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:

screenshot of the problem and proposed resolution (74.35 KB, image/png)
2022-08-12 22:53 UTC, Adam Fontenot

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2022-08-12 22:53:06 UTC
Created attachment 151292 [details]
screenshot of the problem and proposed resolution

Everywhere a window preview is shown (e.g. in present-windows, in the window previews of Plasma's icons-only task manager, etc), it is low quality - meaning "pixelated" looking, with strong color fringing around text (when sub-pixel anti-aliasing is enabled for font rendering on the system). 

I am assuming that different tools utilizing window previews under KWin rely on the same scaling code, since the issue is the same in each case, so I'm reporting this as a general bug.

1. Make sure the compositor's scale method is set to "accurate" instead of smooth - just in case it might have an effect.
2. Open a bunch of windows and then activate the "present windows" effect. (Opening a bunch of windows will make the resulting preview size smaller, which will make the problem easier to see on high resolution screens.)

Quality is poor (see attached screenshot). Strong color fringing around text is probably caused by using a nearest neighbor / point algorithm to rescale the window preview.

Quality is acceptable (see attached screenshot). For the sample shown in the screenshot, I captured the window at full resolution and used a (still very cheap and fast) bilinear filter to create a preview of the same size as the one created by KWin.

Window rescaling is probably GPU accelerated anyway (?) so I don't think using a slightly more expensive algorithm like bilinear should be a problem. If it might be on some systems, perhaps a setting to enable or disable it could be added.

Linux: Arch Linux x86_64 (kernel 5.18.16-arch1-1)
KDE Plasma Version: 5.25.4 (x11)
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5


I've always thought it would be nice if window previews also showed the window decorations.
Comment 1 Mihai Bazon 2022-10-19 14:07:00 UTC
Just adding my voice here. I'm with KDE for 5 years and loving it, but since the QML rewrite of the desktop effects, that occurred in 5.25, the experience has been degraded to say the least. Window thumbnails look poor, and animation is choppy (for both desktop grid and present windows). I'm a developer myself and understand the benefits of having cleaner and more maintainable code, but this seems to have been rushed and the result is ugly compared to the smoothness of 5.24.

Operating System: Arch Linux
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.1-arch2-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700U with Radeon Graphics
Memory: 22.9 GiB of RAM
Graphics Processor: RENOIR
Product Name: VivoBook_ASUSLaptop X513UA_M513UA
System Version: 1.0
Comment 2 Nate Graham 2023-09-12 17:06:46 UTC

*** This bug has been marked as a duplicate of bug 422117 ***