On tis, 2013-05-14 at 13:43 -0700, Bill Spitzak wrote:
> al...@redhat.com wrote:
> 
> > +      </description>
> > +      <arg name="scale" type="fixed"/>
> > +    </request>
> >     </interface>
> 
> Fixed is not a good idea for scaling factors. You cannot accurately 
> represent values like 2/3 or 1/fixed. For an actual problem with 
> scaling, if the accurate scaling is an odd fixed number, the client 
> cannot specify that their scale is exactly 1/2 that, thus losing the 
> ability to get a 2x scale done by the compositor.
> 
> I would specify the scale as two integers defining a rational fraction.
> 
> This would also allow completely lossless multiplication with the 
> rational numbers used by the scaler proposal.
> 
> You may also want to allow different horizontal and vertical scales, 
> mostly because all plausable implementations can do this with no loss of 
> speed, and the scaler api allows this. You will need to define if this 
> is before or after the buffer transform...

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.


_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to