[PATCH weston 4/8] protocol: crop & scale RFC v3

Bill Spitzak spitzak at gmail.com
Wed Dec 4 00:07:53 PST 2013


On 12/03/2013 11:13 PM, Pekka Paalanen wrote:

> Ookay, so far it is just me vs. Daniel on the wl_fixed_t issue. Any
> other opinions for/against changing wl_fixed_t to just int?

The source rectangle has to be fractional so that a particular scale can 
be chosen.

Otherwise the scale will change in annoying small irregular ways if the 
output rectangle is changed in size (and treated as a window into a 
larger scaled image), since the source would have to be rounded to the 
nearest integer. It will also make it impossible to register two 
pictures of different sizes (such as when video playback quality is 
changed).

I *think* rounding to the nearest 1/256 of a pixel may be ok, but would 
prefer that this be a fixed xy translate (in output pixels, not input 
pixels), and two fractions giving the scale in each direction.

Any hardware that can crop to a rectangle will support fractional source 
rectangles. This is because I could choose a larger source and 
destination and then a crop equal to my real destination to achieve the 
equivalent of any fractional source rectangle.



More information about the wayland-devel mailing list