Re: Atomic surface state updates (Re: [PATCH 0/8] Thread safety patches and 1.0 plan)

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 12:46:18PM +0300, Pekka Paalanen wrote: > On Tue, 9 Oct 2012 22:37:57 -0400 > Kristian Høgsberg wrote: > > > Hi all, > > > > Wayland 1.0 is just around the corner and we have a couple of blockers for > > that release: thread safety of the client side API and the surface

[PATCH] Update to new fd and wl_registry APIs

2012-10-10 Thread Kristian Høgsberg
This commit updates the clients and the wayland compositor backend to use the new wl_registry mechanism and the thread safe fd API. --- This is the weston patch that goes with the 8 thread-safety wayland patches. The wl_registry changes are mostly mechanical, while the fd changes are a little more

Re: [PATCH 1/8] Change filedescriptor API to be thread safe

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 11:32:15AM +0300, Pekka Paalanen wrote: > On Tue, 9 Oct 2012 22:37:58 -0400 > Kristian Høgsberg wrote: > > > The update callback for the file descriptors was always a bit awkward and > > un-intuitive. The idea was that whenever the protocol code needed to > > write data

Re: [PATCH 6/8] scanner: Generate client stubs for wl_display requests

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 04:39:02PM +0300, Pekka Paalanen wrote: > On Tue, 9 Oct 2012 22:38:03 -0400 > Kristian Høgsberg wrote: > > > We used to special case this because of the untyped new-id argument in > > the bind request. Now that the scanner can handle that, we can > > remove the special c

Re: [PATCH] doc: Update drag and drop section and add info about selections

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 11:29:13PM +0300, Ander Conselvan de Oliveira wrote: > From: Ander Conselvan de Oliveira > > Replace the outdated section about drag and drop support with a > rewritten section covering the data source/offer mechanism and > wl_data_device, explaining how selection and drag

Re: [PATCH 5/8] scanner: Send interface name and version for types new_id args

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 04:35:56PM +0300, Pekka Paalanen wrote: > On Tue, 9 Oct 2012 22:38:02 -0400 > Kristian Høgsberg wrote: > > > This makes the scanner generate the code and meta data to send the > > interface name and version when we pass a typeless new_id. This way, the > > generic factor

[PATCH] doc: Update drag and drop section and add info about selections

2012-10-10 Thread Ander Conselvan de Oliveira
From: Ander Conselvan de Oliveira Replace the outdated section about drag and drop support with a rewritten section covering the data source/offer mechanism and wl_data_device, explaining how selection and drag ang drop works. --- doc/Wayland/en_US/Protocol.xml | 259 +++

Re: [PATCH 4/8] client: Add wl_event_queue for multi-thread dispatching

2012-10-10 Thread Kristian Høgsberg
On Wed, Oct 10, 2012 at 03:43:26PM +0300, Ander Conselvan de Oliveira wrote: > On 10/10/2012 05:38 AM, Kristian Høgsberg wrote: > >This introduces wl_event_queue, which is what will make multi-threaded > >wayland clients possible and useful. The driving use case is that of a > >GL rendering thread

Re: [PATCH weston] toytoolkit: Take into account transform when sending output allocation.

2012-10-10 Thread Kristian Høgsberg
On Sat, Sep 29, 2012 at 02:03:11AM -0600, Scott Moreau wrote: > --- > > It seems only wscreensaver and tablet-shell use output_get_allocation(). This > fixes a problem when screensaver gets the wrong size for transformed outputs > where width and height are swapped. Looks good, thanks. Kristian

Re: [PATCH weston v4] toytoolkit: Don't draw shadows for maximized windows.

2012-10-10 Thread Kristian Høgsberg
On Fri, Sep 28, 2012 at 02:45:06AM -0600, Scott Moreau wrote: > Add THEME_FRAME_MAXIMIZED flag so the theming system can know not to draw > shadows for maximized windows. This allows maximized surfaces' content to be > sized and placed in a more expectable fashion. > > --- > > >On Tue, Aug 07, 20

Re: Building Wayland on Ubuntu

2012-10-10 Thread Simos Xenitellis
On Wed, Oct 10, 2012 at 7:09 PM, 김은철 wrote: > Hi I am trying to build Wayland on Ubuntu. > > The problem is that now I get this error during build. > > - Requested 'xcb-glx >= 1.8.1' but version of XCB GLX is 1.5 > > I am trying to download package using 'sudo apt-get install libxcb-glx0' > but I

Building Wayland on Ubuntu

2012-10-10 Thread 김은철
Hi I am trying to build Wayland on Ubuntu. The problem is that now I get this error during build. - Requested 'xcb-glx >= 1.8.1' but version of XCB GLX is 1.5 I am trying to download package using 'sudo apt-get install libxcb-glx0' but I got the message 'already newest' How can i fix this probl

Re: [PATCH wayland 2/4] protocol: clarify input region on drags and pointers

2012-10-10 Thread Pekka Paalanen
On Wed, 10 Oct 2012 16:58:29 +0300 Ander Conselvan de Oliveira wrote: > On 10/10/2012 01:51 PM, Pekka Paalanen wrote: > > On Wed, 10 Oct 2012 13:28:07 +0300 > > Ander Conselvan de Oliveira wrote: > > > >> On 10/10/2012 12:47 PM, Pekka Paalanen wrote: > >>> Drag icon and cursor surfaces must neve

Re: [PATCH wayland 2/4] protocol: clarify input region on drags and pointers

2012-10-10 Thread Ander Conselvan de Oliveira
On 10/10/2012 01:51 PM, Pekka Paalanen wrote: On Wed, 10 Oct 2012 13:28:07 +0300 Ander Conselvan de Oliveira wrote: On 10/10/2012 12:47 PM, Pekka Paalanen wrote: Drag icon and cursor surfaces must never receive input, so their input region is always empty. Signed-off-by: Pekka Paalanen ---

Re: [PATCH 6/8] scanner: Generate client stubs for wl_display requests

2012-10-10 Thread Pekka Paalanen
On Tue, 9 Oct 2012 22:38:03 -0400 Kristian Høgsberg wrote: > We used to special case this because of the untyped new-id argument in > the bind request. Now that the scanner can handle that, we can > remove the special case. I think you could mention here, that wl_display_bind() now takes versi

Re: [PATCH 5/8] scanner: Send interface name and version for types new_id args

2012-10-10 Thread Pekka Paalanen
On Tue, 9 Oct 2012 22:38:02 -0400 Kristian Høgsberg wrote: > This makes the scanner generate the code and meta data to send the > interface name and version when we pass a typeless new_id. This way, the > generic factory mechanism provided by wl_display.bind can be provided by > any interface.

Re: [PATCH 0/8] Thread safety patches and 1.0 plan

2012-10-10 Thread Tiago Vignatti
Hi Kristian, On 10/10/2012 05:37 AM, Kristian Høgsberg wrote: Anyway, I would much appreciate feedback on these patches, but I do also expect that we'll merge them (and Pekkas patches) within a couple of days, update clients and toolkits and then cut the 1.0 release of wayland next week. I sa

Re: [PATCH 4/8] client: Add wl_event_queue for multi-thread dispatching

2012-10-10 Thread Ander Conselvan de Oliveira
On 10/10/2012 05:38 AM, Kristian Høgsberg wrote: This introduces wl_event_queue, which is what will make multi-threaded wayland clients possible and useful. The driving use case is that of a GL rendering thread that renders and calls eglSwapBuffer independently of a "main thread" that owns the w

Re: [PATCH wayland 2/4] protocol: clarify input region on drags and pointers

2012-10-10 Thread Pekka Paalanen
On Wed, 10 Oct 2012 13:28:07 +0300 Ander Conselvan de Oliveira wrote: > On 10/10/2012 12:47 PM, Pekka Paalanen wrote: > > Drag icon and cursor surfaces must never receive input, so their input > > region is always empty. > > > > Signed-off-by: Pekka Paalanen > > --- > > protocol/wayland.xml |

Re: [PATCH wayland 2/4] protocol: clarify input region on drags and pointers

2012-10-10 Thread Ander Conselvan de Oliveira
On 10/10/2012 12:47 PM, Pekka Paalanen wrote: Drag icon and cursor surfaces must never receive input, so their input region is always empty. Signed-off-by: Pekka Paalanen --- protocol/wayland.xml | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pro

[PATCH mesa] wayland: use wl_surface_commit()

2012-10-10 Thread Pekka Paalanen
Use wl_surface_commit() to kick the attach, damage and frame requests in the server, and actually push the buffer to the surface. This change depends on wayland commit "protocol: double-buffered state for wl_surface" which broke the wayland protocol. Signed-off-by: Pekka Paalanen --- src/egl/dr

[PATCH weston 12/12] compositor: allow override of wl_surface.commit

2012-10-10 Thread Pekka Paalanen
Rename surface_commit() into weston_surface_commit(), and call it via a function pointer in struct weston_surface. This will allow special surfaces to avoid being committed; a sub-surface rendered into with GL, for instance (eglSwapbuffers always does a commit). Signed-off-by: Pekka Paalanen ---

[PATCH weston 11/12] compositor: add weston_surface:commit_signal

2012-10-10 Thread Pekka Paalanen
If you need to to hook up futher state latching to the wl_surface.commit for a specific surface, use this. Signed-off-by: Pekka Paalanen --- src/compositor.c |3 +++ src/compositor.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/compositor.c

[PATCH weston 10/12] compositor: fix event-test

2012-10-10 Thread Pekka Paalanen
event-test assumes, that even without the very first wl_surface.attach (and commit), the surface will have infinite (previously undef) input region. event-test simply has test-client to create a wl_surface, and then it forcefully sets its position and size, and assumes the input region is now the f

[PATCH weston 09/12] compositor, clients: apply wl_surface.frame on commit

2012-10-10 Thread Pekka Paalanen
Apply wl_surface.frame request only on the next wl_surface.commit according to the new protocol. This makes it explicit, which repaint actually triggered the frame callback, since commit schedules a repaint. Otherwise, something causing a repaint before a commit could trigger the frame callback to

[PATCH weston 07/12] shell: do not double-init input region

2012-10-10 Thread Pekka Paalanen
weston_surface_create() already inits the input region. Signed-off-by: Pekka Paalanen --- src/shell.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/shell.c b/src/shell.c index 4600be3..f9aa546 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3475,6 +3475,7 @@ debug_r

[PATCH weston 08/12] compositor: fix surface pointer cast

2012-10-10 Thread Pekka Paalanen
In weston, the wl_resource:data field for a wl_surface object always contains struct weston_surface *, never struct wl_surface *. Even though this is just a cosmetic fix, it should reduce confusion. Signed-off-by: Pekka Paalanen --- src/compositor.c |3 +-- 1 files changed, 1 insertions(+),

[PATCH weston 05/12] compositor, clients: double-buffer opaque region

2012-10-10 Thread Pekka Paalanen
Make wl_surface.set_opaque_region double-buffered as required by the new protocol. Also, do not reset the opaque region on surface size changes anymore. Only explicit requests from the client will change the region now. In clients, make sure commit happens after setting the opaque region. Mesa do

[PATCH weston 06/12] compositor, clients: double-buffer input region

2012-10-10 Thread Pekka Paalanen
Make input region double-buffered as specified in the new protocol. While doing it, get rid of the undef region code, and instead use a maximum sized real pixman region. This avoids special-casing regions that might sometimes be undef. As the input region is now usable by default instead of undef

[PATCH weston 03/12] compositor, clients: make damage double-buffered

2012-10-10 Thread Pekka Paalanen
This change depends on the Wayland commit "protocol: double-buffered state for wl_surface". Implement double-buffering of damage in the compositor as required by the new protocol. Ensure all Weston demo clients call wl_surface_commit() after wl_surface_damage(). Mesa does not need a fix for this

[PATCH weston 04/12] shell: do not double-init a region

2012-10-10 Thread Pekka Paalanen
weston_surface_create() already inits the opaque region, so the second init in create_black_surface() is logically wrong. Whether this was a memory leak or not, depends on Pixman internals. Fini before initing again. Signed-off-by: Pekka Paalanen --- src/shell.c |1 + 1 files changed, 1 ins

[PATCH weston 02/12] clients: use wl_surface_commit

2012-10-10 Thread Pekka Paalanen
Use wl_surface_commit() to commit the buffer attach, as Weston now requires. NOTE: GL-applications are broken until you upgrade to a version of Mesa which does wl_surface_commit() on eglSwapBuffers(). If you have Cairo-gl, this means all toytoolkit apps, too. simple-shm and simple-touch OTOH will

[PATCH weston 01/12] compositor: make wl_surface.attach double-buffered

2012-10-10 Thread Pekka Paalanen
This change depends on the Wayland commit "protocol: double-buffered state for wl_surface". Clients are now required to issue wl_surface.commit for the wl_surface.attach to take effect. While changing this, change the surface argument to weston_surface_attach() from wl_surface into weston_surface

[PATCH wayland 4/4] protocol: elaborate on wl_buffer

2012-10-10 Thread Pekka Paalanen
Spell out exactly when a client may re-use a wl_buffer or its backing storage. Mention the optimization for GL-compositor with wl_shm-clients. Signed-off-by: Pekka Paalanen --- protocol/wayland.xml | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/protoco

[PATCH wayland 2/4] protocol: clarify input region on drags and pointers

2012-10-10 Thread Pekka Paalanen
Drag icon and cursor surfaces must never receive input, so their input region is always empty. Signed-off-by: Pekka Paalanen --- protocol/wayland.xml | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index c45

[PATCH wayland 3/4] protocol: wl_surface.frame needs wl_surface.commit

2012-10-10 Thread Pekka Paalanen
Clarify, when frame request takes effect. Explain when to send/receive the callback. Signed-off-by: Pekka Paalanen --- protocol/wayland.xml | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 6293f56..740fb43 1006

[PATCH wayland 1/4] protocol: double-buffered state for wl_surface

2012-10-10 Thread Pekka Paalanen
This change breaks the protocol. The current protocol is racy in that updates to surface content and surface state (e.g. damage, input and opaque regions) are not guaranteed to happen at the same time. Due to protocol buffering and handling practices, the issues are very hard to trigger. Committi

Atomic surface state updates (Re: [PATCH 0/8] Thread safety patches and 1.0 plan)

2012-10-10 Thread Pekka Paalanen
On Tue, 9 Oct 2012 22:37:57 -0400 Kristian Høgsberg wrote: > Hi all, > > Wayland 1.0 is just around the corner and we have a couple of blockers for > that release: thread safety of the client side API and the surface commit > feature. Pekka has been working on the commit part and these eight p

Re: [PATCH 1/8] Change filedescriptor API to be thread safe

2012-10-10 Thread Pekka Paalanen
On Tue, 9 Oct 2012 22:37:58 -0400 Kristian Høgsberg wrote: > The update callback for the file descriptors was always a bit awkward and > un-intuitive. The idea was that whenever the protocol code needed to > write data to the fd it would call the 'update' function. This function > would adjust