Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

Alexander Larsson alexl at redhat.com
Wed May 22 02:42:11 PDT 2013


On ons, 2013-05-22 at 12:11 +0300, Pekka Paalanen wrote:
> On Wed, 22 May 2013 10:12:00 +0200
> Alexander Larsson <alexl at redhat.com> wrote:
> 
> > On tis, 2013-05-21 at 20:57 +0300, Pekka Paalanen wrote:
> > 
> > > We use the units of "pixels" in the surface coordinate system, even
> > > if they do not correspond exactly to any "real" pixels like
> > > elements in a buffer or on screen.
> > 
> > Actually this is sort of a problem. Maybe the docs would be clearer if
> > we just used a different name for these? "points"?
> 
> That is a good idea, but choosing a name is hard. I think points will
> get too easily confused with font sizes or the 1/72 inches unit and all
> that mess.
> 
> Follow Android with "dp"?
> http://developer.android.com/guide/topics/resources/more-resources.html#Dimension
> 
> I'm not sure that is exactly the definition we want to use, with just
> 160 dpi changed to 96 dpi. I feel uneasy mentioning dpi at all. So
> maybe not "dp", then.

Yeah, i'd rather have it disconnected from some physical notion of size.

> We need a name for the surface length unit, since the surface local
> coordinate system is such a central concept in Wayland.
> 
> I just can't seem to come up with anything serious.
> - wayland units, wu
> - wayland pixels, wp, wpx
> - surface units, su
> - surface unit pixels, sux
> - surface pixels, sp, spx
> - wayland surface units, wsu
> - wayland atomic units, wau
> - pips, pip
> ehhh...

Yeah, names are hard. But "sux" is awesome!

Other alternatives:
- compositor units, cu
- pels, pel
- dots, dot
- surface element, surfel, sel

none of these are great either...









More information about the wayland-devel mailing list