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

2013-11-26 Thread Bill Spitzak
Jonny Lamb wrote: Changes in v3: Disallow zero values for dst_width and dst_height. This all looks a lot better. + The coordinate transformations from buffer pixel coordinates up to + the surface-local coordinates happen in the following order: +1. buffer_transform (wl_sur

Re: Protocol documentation

2013-11-26 Thread Bill Spitzak
That does seem a lot easier to read. And (YEA!) the section "References" indicates the interface(s) used to create an instance. For instance wl_pointer has under "References" (as the only entry) "wl_seat.get_pointer". That really helps a lot! Could the fact that the "reference" has "(new_id)"

Re: Protocol documentation

2013-11-26 Thread Jason Ekstrand
Jonny, Thanks! I think that's far easier to read than the stuff publican dumps. The only problem is that your doc generator doesn't handle paragraph breaks properly. For instance, the wl_surface.attach request documentation is supposed to have 7 paragraphs and they get smashed into one: http://p

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

2013-11-26 Thread Jonny Lamb
From: Pekka Paalanen Add cropping and scaling to wl_surface. Add a global factory interface wl_scaler, which creates wl_scaler_surface objects tied to a given wl_surface. The wl_scaler_surface object can be used to set a cropping and scaling transformation to change how a wl_buffer maps to wl_su

[PATCH weston 8/8] clients: add scaler test app

2013-11-26 Thread Jonny Lamb
This client tests the wl_scaler and wl_surface_scaler protocol extensions by cropping and then scaling a surface to ensure it is rendered correctly. More details in comments in the code. --- clients/.gitignore | 3 + clients/Makefile.am | 8 ++ clients/scaler.c| 215 ++

[PATCH weston 3/8] compositor: merge surface size from buffer size funcs

2013-11-26 Thread Jonny Lamb
From: Pekka Paalanen Replace the two functions getting the intended surface dimensions from the surface's buffer and buffer transformation parameters by a single function that just set the surface size according to all the buffer state. The old functions were always called in pairs, and always a

[PATCH weston 7/8] pixman-renderer: implement surface scaling and cropping

2013-11-26 Thread Jonny Lamb
The pixman renderer doesn't use the weston_surface_to_buffer* functions to alter coordinates depending on buffer transformation, buffer scaling, and surface scaler (wl_surface_scaler). pixman_transform_scale() is used instead to perform said transformations without having to modify each coordinate.

[PATCH weston 2/8] compositor: do not recompute size on pointer_set_cursor

2013-11-26 Thread Jonny Lamb
From: Pekka Paalanen This removes the calls to weston_surface_buffer_width/height() from input.c, which are the last external calls to them. Instead, use the cached values from weston_surface::width,height. These have already been set by weston_surface_commit(), because that is the only way a we

[PATCH weston 6/8] compositor: transform surface coordinates if a surface scaler is used

2013-11-26 Thread Jonny Lamb
Implements wl_surface_scaler.set by setting desired src_{x,y,width,height} and dst_{width,height} values in the weston_buffer_viewport struct, then altering coordinates in weston_surface_to_buffer* functions if there is a scaler set for said surface. --- src/compositor.c | 84 +

[PATCH weston 5/8] compositor: add stub scaler resources

2013-11-26 Thread Jonny Lamb
This registers the wl_scaler global object and lets clients create wl_surface_scaler objects for surfaces. wl_surface_scaler.set is not implemented so this doesn't really do anything useful yet. --- src/.gitignore | 2 ++ src/Makefile.am | 4 +++ src/compositor.c | 103 +

[PATCH weston 1/8] compositor: gather buffer_transform and _scale into a struct

2013-11-26 Thread Jonny Lamb
From: Pekka Paalanen Gather the variables affecting the coordinate transformations between buffer and local coordinates into a new struct weston_buffer_viewport. This will be more useful later, when the crop & scale extension is implemented. --- src/compositor-drm.c | 11 ++- src/compo

RFC: surface crop and scale protocol extension

2013-11-26 Thread Jonny Lamb
Hello. This is the initial version of the weston implementation of the wl_scaler protocol extension for surface cropping and scaling. It is based on the extension RFC version 3, written by Pekka Paalanen. Earlier versions are: http://lists.freedesktop.org/archives/wayland-devel/2013-April/008927.

Re: [PATCH 14/17] shell: Factor out common code to create fullscreen black surfaces

2013-11-26 Thread Pekka Paalanen
On Mon, 25 Nov 2013 18:01:43 + Philip Withnall wrote: > From: Philip Withnall > > --- > src/shell.c | 66 > ++--- > 1 file changed, 24 insertions(+), 42 deletions(-) > > diff --git a/src/shell.c b/src/shell.c > index 96bfea0..a505bf

Protocol documentation

2013-11-26 Thread Jonny Lamb
Hi. I have recently been working on some Wayland protocol stuff and found referring to the XML tiresome. Telepathy's D-Bus protocol has a parser which outputs pretty HTML from the XML[0] so I took said parser and modified it for the Wayland XML format: core Wayland protocol (as of 5a019e3)

[PATCH] exposay: provide a cancel func to the ptr grab iface

2013-11-26 Thread pochu27
From: Emilio Pozuelo Monfort Fixes a crash when cancel is called while exposay is in progress. --- src/shell.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/shell.c b/src/shell.c index f102e9a..6ba1f10 100644 --- a/src/shell.c +++ b/src/shell.c @@ -5275,10 +5275,20 @@ expos

Wayland tests

2013-11-26 Thread Marek Ch
Hi, I wrote a few tests which test client-display protocol. These tests create it's own display so they are independent on weston. WIll somebody be so kind and look at the code? :) I'd like to get some feedback. The code is here: https://github.com/mchalupa/wayland/tree/wits All comments are wel