Re: [PATCH weston 00/18] Raspberry Pi: a new renderer and demos

2013-05-23 Thread Pekka Paalanen
On Wed, 22 May 2013 18:03:03 +0300 ppaala...@gmail.com wrote: > From: Pekka Paalanen > > Hi all, > > this patch series consists of several independent features, which all come > together in demonstrating the capabilities of Raspberry Pi for running a > desktop. > > We add a new rpi-renderer, t

Re: [PATCH] wayland-server: Version check requests

2013-05-23 Thread Jason Ekstrand
On Thu, May 23, 2013 at 3:20 PM, wrote: > From: Alexander Larsson > > If an interface has any messages and its version is larger than 1 > then we emit a method counts array which lists the number of methods > for each version of the interface. This can be used in addition > to the normal method_

Re: [PATCH] wl_resource: Add version field and getter/setter

2013-05-23 Thread Jason Ekstrand
Alex, Really, this looks like a pretty clean solution. I've spent a fair amount of time banging around trying to extend wl_resource and this is better than anything I ever came up with. I only have the one comment (already mentioned on IRC but repeated here for the sake of the list). On Thu, May

[PATCH] Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.

2013-05-23 Thread Sinclair Yeh
v2: Fixed the wrong comparison v1: Depending on specific DRI driver implementation, glTexImage2D() with data set to NULL may or may not re-allocate the texture buffer each time it is called. Unintended consequences happen if later glTexSubImage2D() is called to only update a sub-region of the tex

[PATCH] wayland-server: Version check requests

2013-05-23 Thread alexl
From: Alexander Larsson If an interface has any messages and its version is larger than 1 then we emit a method counts array which lists the number of methods for each version of the interface. This can be used in addition to the normal method_count to reject requests that the server doesn't supp

Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces

2013-05-23 Thread Alexander Larsson
> What if a client sets scale=0? I guess we should forbid that, as it risks things dividing by zero. > Maybe the scale should also be signed here? I think all sizes are > signed, too, even though a negative size does not make sense. We seem > to have a convention, that numbers you compute with ar

[PATCH 2/2] compositor/shell: Set version on all wl_resources

2013-05-23 Thread alexl
From: Alexander Larsson A few wl_resources have version != 1, we need to set this based on the supported version and the client requested version. --- src/compositor.c | 22 -- src/shell.c | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/compos

[PATCH 1/2] Add MIN() macro

2013-05-23 Thread alexl
From: Alexander Larsson This will be needed for the version negotiation --- src/compositor.h | 4 1 file changed, 4 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 06476cc..8f96016 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -36,6 +36,10 @@ extern "C" { #i

[PATCH 0/2] Do proper version negotiation V2

2013-05-23 Thread alexl
From: Alexander Larsson This initializes the new version field of wl_resource to the negotiated value (i.e. the min of the requested version and the version supported by weston). Alexander Larsson (2): Add MIN() macro compositor/shell: Set version on all wl_resources src/compositor.c | 22

[PATCH] wl_resource: Add version field and getter/setter

2013-05-23 Thread alexl
From: Alexander Larsson We create a private structure for extra data and store it in a destroy notifier. In this way we can store the version in a backwards compatible way. This lets us track the actual version of a resource which is generally the min of what the client requested and what the se

[PATCH] Add version support to wl_resource

2013-05-23 Thread alexl
From: Alexander Larsson New simpler version that uses a destroy notify to stash away the private pointer. Alexander Larsson (1): wl_resource: Add version field and getter/setter src/wayland-server.c | 58 +++- src/wayland-server.h | 6 ++

Re: [PATCH wayland-web] raspberrypi: update for the new rpi-backend

2013-05-23 Thread darxus
Committed, html validated. On 05/22, ppaala...@gmail.com wrote: > From: Pekka Paalanen > > This depends on the rpi-renderer patch series for Weston. > > Update the build instructions for the current state of Weston, remove > options that do not exist anymore, add some more troubleshooting issue

[PATCH 3/3] compositor/shell: Set version on all wl_resources

2013-05-23 Thread alexl
From: Alexander Larsson A few wl_resources have version != 1, we need to set this based on the supported version and the client requested version. --- src/compositor.c | 22 -- src/shell.c | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/compos

[PATCH 2/3] Add MIN() macro

2013-05-23 Thread alexl
From: Alexander Larsson This will be needed for the version negotiation --- src/compositor.h | 4 1 file changed, 4 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 176b501..5ddbc95 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -36,6 +36,10 @@ extern "C" { #i

[PATCH 1/3] Update wl_resource.link to wl_slist due to wayland change

2013-05-23 Thread alexl
From: Alexander Larsson --- src/compositor.c | 12 ++- src/compositor.h | 12 +-- src/data-device.c | 10 + src/input.c | 62 +++ src/shell.c | 10 + 5 files changed, 69 insertions(+), 37 deletions(

[PATCH 0/3] Do proper version negotiation

2013-05-23 Thread alexl
From: Alexander Larsson This initializes the new version field of wl_resource to the negotiated value (i.e. the min of the requested version and the version supported by weston). Alexander Larsson (3): Update wl_resource.link to wl_slist due to wayland change Add MIN() macro compositor/she

[PATCH 4/4] wl_resource: Add version field and getter/setter

2013-05-23 Thread alexl
From: Alexander Larsson This lets us track the actual version of a resource which is generally the min of what the client requested and what the server supports. This will let us avoid sending messages the client doesn't support and to not handle requests the server doesn't support. --- src/wayl

[PATCH 3/4] wl_resource: Add a private field to wl_resource

2013-05-23 Thread alexl
From: Alexander Larsson This takes the place of the second pointer in the old wl_list and lets us add more fields to wl_resource in a backwards compat fashion. --- src/wayland-private.h | 4 src/wayland-server.c | 17 - src/wayland-server.h | 4 +++- 3 files changed, 23

[PATCH 2/4] Convert wl_resource.link to a wl_slink

2013-05-23 Thread alexl
From: Alexander Larsson This lets us free up an extra pointer in wl_resource for other use. --- src/wayland-server.c | 17 ++--- src/wayland-server.h | 3 ++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index a3d3887..f

[PATCH 1/4] Add single linked lists wl_slist similar to wl_list

2013-05-23 Thread alexl
From: Alexander Larsson --- src/wayland-util.c | 66 ++ src/wayland-util.h | 24 2 files changed, 90 insertions(+) diff --git a/src/wayland-util.c b/src/wayland-util.c index 598ab42..c774a7e 100644 --- a/src/wayland-util.c

[PATCH 0/4] Add version support to wl_resource

2013-05-23 Thread alexl
From: Alexander Larsson Unfortunately there seems to be no easy way to add a version field to wl_resource in a compatible way, even if we are willing to break the server library API for compositors, as the wl_resource struct is embedded in a struct in the EGL code in mesa. Here is a version that

Re: [PATCH] Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.

2013-05-23 Thread Sinclair Yeh
On Thu, May 23, 2013 at 05:47:01PM +0100, Daniel Stone wrote: > Hi, > > On 23 May 2013 17:38, Sinclair Yeh wrote: > > + /* Only allocate a texture if it doesn't match existing one > > */ > > + if (((wl_shm_buffer_get_stride(buffer) / 4) != gs->pitch) || > > +

Re: [PATCH] Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.

2013-05-23 Thread Daniel Stone
Hi, On 23 May 2013 17:38, Sinclair Yeh wrote: > + /* Only allocate a texture if it doesn't match existing one */ > + if (((wl_shm_buffer_get_stride(buffer) / 4) != gs->pitch) || > + (buffer->height != gs->pitch)) { It seems like this really should be

[PATCH] Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.

2013-05-23 Thread Sinclair Yeh
Depending on specific DRI driver implementation, glTexImage2D() with data set to NULL may or may not re-allocate the texture buffer each time it is called. Unintended consequences happen if later glTexSubImage2D() is called to only update a sub-region of the texture buffer. I've explored moving g

RE: [PATCH weston] shell: End grab if the grabbed shell surface has been destroyed

2013-05-23 Thread Eoff, Ullysses A
Rob, turns out the client side test case crash was just coincidental. I isolated the problem to a change in efl toolkit that occurred around the same time the weston bug was introduced. Thanks for the weston fix... it's working good now ;-) U. Artie > -Original Message- > From: Eoff, U

Output modes and scaling

2013-05-23 Thread John Kåre Alsaker
I see Alexander Larsson added a scaled flag to the output modes. Presumably this is because he scales down the width and height of the mode by the scaling factor of the output. This probably shouldn't be done. The scaling factor only works for the current mode. It isn't representative for the othe

Re: [PATCH weston] compositor-x11: fix default output scale

2013-05-23 Thread Kristian Høgsberg
On Thu, May 23, 2013 at 01:31:39PM +0300, ppaala...@gmail.com wrote: > From: Pekka Paalanen > > Default output scale of 256 makes little sense. Actually this is a type > mismatch between wl_fixed and int, probably a leftover from when the > scale factor was proposed as a fixed point number. > >

Re: [PATCH 00/15] weston scaling support

2013-05-23 Thread Alexander Larsson
- Original Message - > On Thu, 23 May 2013 10:55:08 +0200 > Alexander Larsson wrote: > > > On ons, 2013-05-22 at 20:36 -0500, Jason Ekstrand wrote: > > > > > > > I hate to rain on the parade, but it's not going to be that simple. I > > > already tried adding a field to wl_resource an

Re: [PATCH weston] compositor-x11: fix default output scale

2013-05-23 Thread Alexander Larsson
- Original Message - > From: Pekka Paalanen > > Default output scale of 256 makes little sense. Actually this is a type > mismatch between wl_fixed and int, probably a leftover from when the > scale factor was proposed as a fixed point number. > > Scale 256 probably causes the Window c

[PATCH weston] compositor-x11: fix default output scale

2013-05-23 Thread ppaalanen
From: Pekka Paalanen Default output scale of 256 makes little sense. Actually this is a type mismatch between wl_fixed and int, probably a leftover from when the scale factor was proposed as a fixed point number. Scale 256 probably causes the Window creation to fail, but that actually leads to a

Re: [PATCH 00/15] weston scaling support

2013-05-23 Thread Pekka Paalanen
On Thu, 23 May 2013 10:55:08 +0200 Alexander Larsson wrote: > On ons, 2013-05-22 at 20:36 -0500, Jason Ekstrand wrote: > > > > I hate to rain on the parade, but it's not going to be that simple. I > > already tried adding a field to wl_resource and, as it currently > > stands, it causes major

Re: [PATCH 00/15] weston scaling support

2013-05-23 Thread Alexander Larsson
On ons, 2013-05-22 at 20:36 -0500, Jason Ekstrand wrote: > I hate to rain on the parade, but it's not going to be that simple. I > already tried adding a field to wl_resource and, as it currently > stands, it causes major issues. As a reminder, this is because > wl_buffer has a wl_resource fiel

Re: [PATCH 00/15] weston scaling support

2013-05-23 Thread Alexander Larsson
On ons, 2013-05-22 at 20:57 -0400, Kristian Høgsberg wrote: > * Don't send out new wl_output events to clients that bind with >version 1. For this I think we want to extend wl_resource with an >int version; field. Somewhat related, and I mentioned this earlier in the thread, we have a p

Re: [RFC weston] compositor: Use ordered layers

2013-05-23 Thread Quentin Glidic
On 22/05/2013 22:05, Kristian Høgsberg wrote: On Tue, May 21, 2013 at 06:26:53PM +0200, Quentin Glidic wrote: From: Quentin Glidic It allows a more generic layer management that several modules can use at the same time without breaking each others’ layers. Signed-off-by: Quentin Glidic ---