[PATCH weston 7/8] protocol, compositor: split wl_viewport setters

Bill Spitzak spitzak at gmail.com
Mon Mar 17 11:54:05 PDT 2014

Pekka Paalanen wrote:

> A zero-area source can theoretically exist: you sample the color
> exactly at src_x,src_y and use that single color for the whole
> surface.

That's an interesting interpretation, but it implies that the filters 
for sampling are allowed, and in fact expected, to sample outside the 
source rectangle. IMHO it should at least be allowed for an 
implementation to clamp the sources for filtered pixels to be inside the 
source rectangle (in pixman I think this is called "pad extension"). 
This cannot be done for a zero-sized source, so I still feel it should 
not be allowed.

> I do agree, that excluding 0x0 from legal source rectangle
> sizes would be ok, too. Then the minimum would be 1/256 x 1/256,
> from the definition of wl_fixed_t. I'll consider that.

Yes this sounds best to me.

> We already have a way to do reflections, we do not need yet another
> one.

Sounds good to me.

> If we make negative numbers an error, I need to add (keep) an error
> code for them.

Isn't there a reusable "invalid arguments" error? It would seem kind of 
annoying that every function that cannot accept all possible inputs has 
to either ignore them or generate a new error message.

More information about the wayland-devel mailing list