surface buffer cardinality and outputs

Andreas Pokorny andreas.pokorny at gmail.com
Mon Mar 25 10:54:51 PDT 2013


2013/3/24 Pekka Paalanen <ppaalanen at gmail.com>:
> [...]
>> On DPI side i only proposed that client tell the compositor the DPI at
>> which it rendered its buffer so that compositor can upscale on high
>> dpi display.
>
> Exactly that is going to be a problem, since I expect rounding
> errors to produce nice 1-pixel glitches in some cases and not in
> others. I believe it is better to use explicit sizes in pixels, not
> dpi multipliers, to avoid any possible rounding problems. After
> all, it is the scaled size in pixels the clients wants to control,
> not physical size directly.
>
> Currently Wayland is a raster protocol, based on units of discrete
> pixels. Using real numbers like DPI in the protocol will be
> complicated because they work in a different domain and so need to
> be converted to the discrete domain. This conversion is only
> approximate. You could of course transmit DPI as a ratio N:M, but
> then it will be equivalent to just transmitting the scaled size in
> pixels, just more complex. We are not using physical units for
> images or geometry, so DPI is meaningless in that respect.

Maybe sub pixel rendering is no longer necessary in the coming years
because pixel densities increase. But then still scaling an already
rastered image will always look blurry.

What if wayland would support different buffer types. Like a vector
graphic buffer which would be a binary encoded static svg image? Or a
multi layer buffer composed out of two color buffers and a low
resolution distance buffer (c.f to [1]). One color buffer for the
background, one for the foreground and the distance buffer to know
where to take the color from and how to blend pixel perfect. That last
one would be extremely specific as it would only reasonably work for
non occluded text. But the idea is not that far away from video
frames.

[1]: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

Then wayland would still be raster protocol, and would not need resize
(or transformation caused) round trips to get perfect glyph display.


regards
Andreas Pokorny


More information about the wayland-devel mailing list