[RFC] wl_surface scale and crop protocol extension

Daniel Stone daniel at fooishbar.org
Thu May 2 11:22:42 PDT 2013


Hi,

On 2 May 2013 15:42, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Ok, I see it now. Sorry, but I missed it on my first read-through.  Yes, it
> fixes the problem, but in an extremely confusing way.  The reason I say it
> is confusing is because it inherently mixes buffer and surface coordinate
> systems.  I really think we need to isolate buffer coordinates from surface
> coordinates more.  Perhaps what we need is two requests: set_source_rect and
> set_dest_rect and completely ignore the x and y from attach.  This both
> provides clarity to the coordinate systems and provides a little separation
> between crop and scale.

Ideally, when wl_surface::commit was added, wl_surface::attach
should've been broken out into wl_surface::attach and
wl_surface::set_position.  Oh well.

That being said, we can't ignore the x and y from attach, because that
_moves the window_ on screen (think resizing from top left), whereas
this is all about how we map the contents of a buffer into that window
- totally unrelated to moving.

So I think the best way to express that is that this is a
transformation that occurs when rendering the buffer - and is thus in
buffer co-ordinates - whereas wl_surface::attach is a window
management primitive and is thus always in surface co-ordinates.

Cheers,
Daniel


More information about the wayland-devel mailing list