Bug 94824 - Documentation of scale option in weston.ini manpage not clear
Summary: Documentation of scale option in weston.ini manpage not clear
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 00:13 UTC by N. W.
Modified: 2016-04-25 21:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description N. W. 2016-04-05 00:13:21 UTC
Hello,

I noticed the scale option in the weston.ini manpage:

http://manpages.ubuntu.com/manpages/xenial/man5/weston.ini.5.html

and googled a bit on it and found the following links:

https://lists.freedesktop.org/archives/wayland-devel/2013-May/009368.html
https://lists.freedesktop.org/archives/wayland-devel/2014-August/016845.html
http://www.phoronix.com/scan.php?page=news_item&px=MTM3NzM

But there does not seem to be any explanation on how exactly the scale option works in layman's terms.

What exactly does it do?

Does it upscale the image via nearest neighbor filtering?

And why does the manpage says one should use "a value of 2 for outputs with high resolution"? Why not a value of 3?

I just want to understand how exactly the scale option works and what it does.

Could anyone explain this and update the manpage please?

Regards
Comment 1 Pekka Paalanen 2016-04-05 08:07:28 UTC
Output scale is a roughly related to the pixel density on the output. Applications are usually sized in pixel units. If your output pixel density is huge, the application elements become too small to read.

On such high density outputs, you set the output scale to larger than one to roughly match the density legacy applications expect.

Applications that do not handle output scale, will be scaled up by the compositor automatically to make them at least readable, if not good looking. I would expect this to be nearest-filtered, but I'm not sure what Weston actually does.

Applications that do handle output scale can choose to draw their content in high resolution (buffer scale greater than one), in which case they can avoid the compositor scaling and show a good quality image that is also of readable size.

Then there is also the case when an application draws with some buffer scale not one, but the output scale is not matching. The compositor usually scales accordingly to account for the scale difference, but it likely will not look pretty because of non-integer total scaling factor. This can happen when a window is spanning two outputs with different output scales.

You can use any integer for output scale, 2 is perhaps most common that is not 1, but any positive integer goes in theory.

If this answers all your questions, which parts of it should be in the manual? Can you write a patch and send it to wayland-devel mailing list?
Comment 2 Yong Bakos 2016-04-21 17:53:36 UTC
Proposed patch sent to mailing list.
https://patchwork.freedesktop.org/patch/82763/
Comment 3 Yong Bakos 2016-04-25 21:26:50 UTC
Patch v2:
https://patchwork.freedesktop.org/patch/83414/

Commit 425d9d9a67c64d13aae80d953b7e266066ece7ed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.