Wayland and fractional scaling

Carlos Pita carlosjosepita at gmail.com
Sun Jan 24 09:08:41 GMT 2021


Hi all,

I would like to ask you a couple of questions about how fractional scaling
is currently implemented in the Wayland compositor if you don't mind.

I understand that the Wayland protocol only allows to specify an integer
scale factor for an app to produce its output. Then the output would be
appropriately downscaled, doing some kind of interpolation for the case of
non integer scales. AFAICS this approach has serious downsides both in
terms of extra processing (for example, at 125% the app has to produce 2 /
1.25 extra pixels in each dimension, hasn't it?) and of degraded output
quality (because of the raster operations while downscaling, not as bad as
upscaling but still not ideal). Indeed, it's the same thing we have been
doing for years with xrandr, albeit at the app level and probably not using
bicubic interpolation as xrandr (BTW, which one do you use? Linear? Do you
fallback to nearest neighbour for integer scales?).

OTOH Qt has the ability to directly produce output at the target fractional
scale. Other toolkits/frameworks/engines also have this ability, I reckon:
Firefox, Chromium and everything Electron based, maybe Flutter, etc. One
toolkit that hasn't the ability is GTK.

So the question is: does KWin somehow special-case Qt apps in order to
avoid the extra processing and lower output quality, given that Qt is
perfectly capable of directly producing the output at the target scale? If
not, what is your opinion about this circumstance? Have you compared the
direct fractional output and the "oversampled" output in typical screens
(say FHD 13-14'' laptop)? I find Plasma font rendering very high quality
and I'm afraid of having to sacrifice that on the altar of Wayland.

Thank you in advance

---
Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20210124/08cf5bd0/attachment.htm>


More information about the kwin mailing list