[PATCH] protocol: Add buffer_scale to wl_surface and wl_output
Bill Spitzak
spitzak at gmail.com
Wed May 15 11:51:02 PDT 2013
Alexander Larsson wrote:
> In fact, working on this in weston a bit it seems that in general, scale
> is seldom used by itself but rather its used to calculate the buffer and
> screen size which are then used, and we want both of these to be
> integers. So, it seems to me that we should specify scaling by giving
> the width/heigh of the surface, which in combination with the buffer
> size gives the exact scaling ratios, plus it guarantees that the scaling
> maps integers to integers.
This now sounds exactly like the "scaler" api.
What is really happening is that the hi-dpi scheme proposed is providing
a "denominator" to the x,y, and size of the output rectangle provided to
the scaler api, so that it can now be fractions. It would work perfectly
well to move that denominator into the scaler api.
Except that events are reported as though the positions are multiplied
by the denominator. I think this is a mistake and events should be
reported in the input space, but this strangeness can be worked around
pretty easily.
More information about the wayland-devel
mailing list