[PATCH] protocol: Add buffer_scale to wl_surface and wl_output

Bill Spitzak spitzak at gmail.com
Tue May 14 13:43:12 PDT 2013


alexl at 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...


More information about the wayland-devel mailing list