<div dir="ltr">On Tue, May 14, 2013 at 11:25 AM, Alexander Larsson <span dir="ltr"><<a href="mailto:alexl@redhat.com" target="_blank">alexl@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On tis, 2013-05-14 at 07:11 +0200, John Kåre Alsaker wrote:<br>
<br>
><br>
> While this isn't a huge problem on GL-based compositors it<br>
> will cause a problem for software compositors. Any scaling<br>
> for that matter is a potential problem there. However, a<br>
> factor of two or something shouldn't be too bad in software.<br>
><br>
> Compositors do not have to scale anything at all. Even with fractional<br>
> scaling factors a compositor could limit itself to just scaling with<br>
> integer factors. I don't think software compositor is a case worth<br>
> considering either. Nobody wants to have those, especially with<br>
> high-DPI displays.<br>
<br>
</div>I don't think it should really be allowed to not apply the scaling.<br></blockquote><div>Users may want to disable scaling as it's not very good looking. I don't think we should enforce a policy about that.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Right now buffer sizes define surface sizes, and that makes surface<br> sizes not really well defined.</blockquote><div>They're defined as the same as buffer sizes (ignoring the trivial transformations). They should still be the same if the scaling factor is not 1.0. Clients should scale both buffers and surfaces. The only thing that should decouple these sizes more are the scaling extension.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For instance, if you maximize a surface,<br>
or resize it you will get a configure request with a surface size<br>
specified. You then want to make your surface that size, so you create a<br> buffer with that size, scaled by the factor you pick.</blockquote><div>You can't scale the input from configure. You are required to create a surface of that size in surface pixels in order for it to match the screen. Clients should still scale content based on the scaling factor even if it isn't in control of the surface size.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If the compositor<br>
chooses not the given factor but rather a somewhat smaller one then your<br>
surface will be larger than expected, and extend outsize of the monitor<br>
in the maximized case, or not hit the pointer in the drag resize case.<br>
<br>
Also, it makes surfaces different sizes on different monitors. If an<br>
output has some specified size/scale factor (1400x900@1.5x say) and you<br>
move a 1400x900 surface from that monitor (fully or partially) to<br>
another with a different scale (1400x900@1x) you want the window to be<br>
the same size, so the scaling factor shouldn't affect surface sizes.<br></blockquote><div>It is much much more important that the input remains sharp than exactly the same size. When the client is moved to another output it can resize itself to better suit the scaling factor of it, if it's able to.</div>
<div><br>>> The size of a window should always be in pixels at the protocol level.<br>
><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What do you mean by window and pixel here. There are multiple pixels and<br>
sizes here:<br>
<br>
compositor pixels:<br>
The 'compositor coordinate system' is an global space where the<br>
wl_outputs are laid out.<br>
framebuffer pixels:<br>
These correspond to the native LCD panel pixel.<br>
buffer pixels:<br>
These are the individual pixels the clients rendered<br>
surface pixels:<br>
These are "pixels" in what the protocol calls "surface local<br>
coordinates".<br></blockquote><div>Most things in the protocol uses surface pixels which is what I usually mean by pixels.<br>
<br>
</div><br></div>