<div dir="ltr"><div><div>You misunderstood what pq said.<br><br></div>You work in "logical pixels". On a hi-DPI display, with twice the pixel density, each "logical pixel" is backed by 4 device pixels. Your actual backing surface containing the pixels is in "device pixels".<br><br>So, if you have an window that is 800x600 logical pixels, when you drag it to a low-DPI display, your backing buffer is 800x600 device pixels. When you drag it to a hi-DPI display, your backing buffer is 1600x1200 device pixels.<br><br></div><div>When you submit your buffer, you tell the compositor what the ratio of device pixels to logical pixels is, in the perhaps misnamed "set_buffer_scale" request. So, for the low-DPI buffer, you submit "1", since 800x600 / 800x600 = 1. When you submit your hi-DPI buffer, you submit "2", since 1600x1200 / 800x600 = 2.<br><br></div><div>If you submit "1" and you are on a low-DPI display, it all matches and things are fine. If you submit "1" and you are on a hi-DPI display, the compositor scales up your buffer to match. If you submit "2" and you are on a hi-DPI display, it all matches up and things are fine. If you submit "2" and you are on a low-DPI display, the compositor scales down your buffer to match.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 6:19 AM, microcai <span dir="ltr"><<a href="mailto:microcai@fedoraproject.org" target="_blank">microcai@fedoraproject.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">在 2015年3月9日 Monday 10:39:20,您写道:<br>
<span class="">> Hi,<br>
><br>
> On Monday, March 9, 2015, microcai <<a href="mailto:microcai@fedoraproject.org">microcai@fedoraproject.org</a>> wrote:<br>
> > so we are forcing two code pathes in APP? or just support non-integer<br>
> > scale?<br>
><br>
> Scaling is a specific fallback for legacy/non-DPI-aware clients, to get<br>
> them to show anything at all. Other clients will render at the appropriate<br>
> resolution already.<br>
<br>
</span>That's not the story I was told. pg says scale is the *only way* to support<br>
HiDPI.<br>
<span class="im HOEnZb"><br>
><br>
> Any plan that relies on integer scaling means you're wasting pixels on your<br>
> lovely dense display. Any plan that relies on non-integer scaling makes<br>
> your text blurry to the point of unreadable - again, a waste of pixels on<br>
> such lovely displays. Just render at the correct scale to begin with.<br>
><br>
> Cheers,<br>
> Daniel<br>
<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">  Jasper<br></div>
</div>