<div dir="ltr"><div>Hi all,</div><div><br></div><div>Currently in HiDPI setting, wayland protocols expose to clients an integer scale per output with wl_output::scale.<br></div><div>But nowadays it is becoming more and more common for users to use a fractional scaling, for instance 1.25 on a 4K display for instance allowing to use a 3072x1728 logical resolution with a more detailed rendering. Compositors such as Mutter, KWin or sway support this.</div><div><br></div><div>In such instances, clients <font size="2">read the scale value of 2 (the ceil value of the fractional scale) and scale their content accordingly, and inform the compositor with</font><font size="2"> wl_surface::set_buffer_scale.</font> They get their logical size using xdg_output::<span class="gmail-pl-s"><span class="gmail-pl-pds"></span>logical_size<span class="gmail-pl-pds">. Clients' top-level surface buffers are in effect fractional_scale * logical_size.<br></span></span></div><div><br></div><div>But one could imagine clients could make use of the fact the output real buffer is not 2 but 1.25 and reduce the size of their rendering buffer, allowing the compositor not to have to do any down scaling when compositing. Video rendering for instance could make use of it.<br></div><div><br></div><div>My personal use case is to allow a screenshot program to export an output rendering with its scaling factor so that it can be viewed at the right scale.</div><div><br></div><div>1/ I would suggest adding to xdg_output a fractional_scale or real_scale real value to expose this real buffer to clients.<br></div><div></div><div><br></div><div>2/ We could add a wl_surface.set_buffer_fractional_scale or wl_surface.real_scale, to inform the compositor, that a surface uses a fractional scale.</div><div></div><div><br></div><div>What do you think ?<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Méven</div></div></div>