Re: [PATCH 0/4] Weston: add support for YUV buffers

2012-04-20 Thread Gwenole Beauchesne
Hi, 2012/4/20 Gwenole Beauchesne : > Issues: > - EXT_texture_rg requirement, could be fixed with an extra EGL attribute. > - Use shaders to render from YUV even if some HW could sample from YUV > textures directly. Actually, I now think both cases could be handled with the same attribute. EGL_

Re: Wayland client library thread safety

2012-04-20 Thread Kristian Høgsberg
On Fri, Apr 20, 2012 at 5:56 PM, Bill Spitzak wrote: > Kristian Høgsberg wrote: > >>> 1) Toughen up and add locking around all access to wl_display.  It's >>>  not as much code as it sounds, there are actually only a few entry >>>  points that need locking. > > > This could be free if the *caller*

Re: Wayland client library thread safety

2012-04-20 Thread Bill Spitzak
Kristian Høgsberg wrote: 1) Toughen up and add locking around all access to wl_display. It's not as much code as it sounds, there are actually only a few entry points that need locking. This could be free if the *caller* is required to lock/unlock. Ie there is a wl_lock/unlock call that

Re: [RFC] shell: modifier bindings configurable

2012-04-20 Thread Kristian Hoegsberg
On Fri, Apr 20, 2012 at 06:54:25PM +0300, Tiago Vignatti wrote: > Weston under X in Ubuntu has this bad behavior, mixing Unity's key bindings > with the ones in Weston. So I'd like to see the modifiers configurable on > Weston. I like it! > - I changed two key combination bindings, the rotation a

Re: Wayland client library thread safety

2012-04-20 Thread Kristian Høgsberg
Really attached now. Kristian On Fri, Apr 20, 2012 at 4:06 PM, Kristian Hoegsberg wrote: > On Thu, Apr 19, 2012 at 03:38:39PM +0200, Arnaud Vrac wrote: >> Hello everyone, >> >> I am hitting a bug when using Qt5 and wayland on an embedded platform, >> for which I have written a custom EGL backend

Re: Wayland client library thread safety

2012-04-20 Thread Kristian Hoegsberg
On Thu, Apr 19, 2012 at 03:38:39PM +0200, Arnaud Vrac wrote: > Hello everyone, > > I am hitting a bug when using Qt5 and wayland on an embedded platform, > for which I have written a custom EGL backend. The problem is that Qt5 > (QtQuick2 actually) renders in a separate thread, when the wayland >

[PATCH 3/3 v1] screenshooter: Don't assume output offsets start at zero

2012-04-20 Thread Scott Moreau
--- clients/screenshot.c | 38 -- 1 files changed, 32 insertions(+), 6 deletions(-) diff --git a/clients/screenshot.c b/clients/screenshot.c index a23ef13..e023199 100644 --- a/clients/screenshot.c +++ b/clients/screenshot.c @@ -26,14 +26,14 @@ #include #i

[PATCH 2/3 v1] screenshooter: Move buffer assembly to client side

2012-04-20 Thread Scott Moreau
--- Removed unused function parameter. clients/screenshot.c | 44 +++- src/screenshooter.c | 38 -- 2 files changed, 47 insertions(+), 35 deletions(-) diff --git a/clients/screenshot.c b/clients/screenshot.c index

[PATCH 1/3 v1] screenshooter: Grab pixel data directly before buffer swap

2012-04-20 Thread Scott Moreau
--- The majority of this patch is krh's, I just put it on top of master and added a mechanism so the client can know when the buffer copy has completed. clients/screenshot.c | 19 - protocol/screenshooter.xml |2 + src/compositor-drm.c | 18 + src/compositor-w

Re: [PATCH 3/3 v2] Send surface enter/leave events

2012-04-20 Thread Kristian Hoegsberg
On Thu, Apr 19, 2012 at 10:50:09PM -0400, cdah...@redhat.com wrote: > From: Casey Dahlin > > These new protocol events allow us to tell which outputs a surface is on, and > potentially update where we allocate our buffers from. This patch has a few problems, but I've debugged it and committed wi

Re: [PATCH 2/3] Add an id field to outputs

2012-04-20 Thread Kristian Hoegsberg
On Thu, Apr 19, 2012 at 10:50:08PM -0400, cdah...@redhat.com wrote: > From: Casey Dahlin > > All outputs now have a unique integer ID, allocated from a bitfield pool in > the > compositor. Committed this one with a few edits as described below. > Signed-off-by: Casey Dahlin > --- > src/compo

Re: [PATCH 1/3] Change find_resource_for_surface to find_resource_for_client

2012-04-20 Thread Kristian Hoegsberg
On Thu, Apr 19, 2012 at 10:50:07PM -0400, cdah...@redhat.com wrote: > From: Casey Dahlin > > This function has generic applications and should be made generic. This one is fine, applied. I edited out the TODO comment as discussed on the list. Kristian > Signed-off-by: Casey Dahlin > --- > s

Re: Wayland client library thread safety

2012-04-20 Thread darxus
On 04/20, Arnaud Vrac wrote: > On Fri, Apr 20, 2012 at 6:33 PM, wrote: > > I guess you're not going to get a useful response here. > > That seems really unfortunate to me.  Please open a bug > > here, so we at least have a proper record of the problem: > > https://bugs.freedesktop.org/enter_bug.c

Re: Wayland client library thread safety

2012-04-20 Thread Arnaud Vrac
On Fri, Apr 20, 2012 at 6:33 PM, wrote: > I guess you're not going to get a useful response here. > That seems really unfortunate to me.  Please open a bug > here, so we at least have a proper record of the problem: > https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland Thanks darxus, I do

Re: Wayland client library thread safety

2012-04-20 Thread darxus
I guess you're not going to get a useful response here. That seems really unfortunate to me. Please open a bug here, so we at least have a proper record of the problem: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland On 04/19, Arnaud Vrac wrote: > Hello everyone, > > I am hitting a bu

[RFC] shell: modifier bindings configurable

2012-04-20 Thread Tiago Vignatti
Weston under X in Ubuntu has this bad behavior, mixing Unity's key bindings with the ones in Weston. So I'd like to see the modifiers configurable on Weston. - I changed two key combination bindings, the rotation and the brightness. - would be cool also to make surface_opacity and zoom bindings c

[PATCH 4/4] compositor: handle YUV buffers.

2012-04-20 Thread Gwenole Beauchesne
Signed-off-by: Gwenole Beauchesne --- src/compositor-wayland.c |2 +- src/compositor.c | 80 - src/compositor.h |2 +- 3 files changed, 66 insertions(+), 18 deletions(-) diff --git a/src/compositor-wayland.c b/src/compositor-w

[PATCH 3/4] compositor: add YUV shaders.

2012-04-20 Thread Gwenole Beauchesne
Add shaders for NV12 (2 planes) and YUV (3 planes). Signed-off-by: Gwenole Beauchesne --- src/compositor.c | 43 +++ src/compositor.h |2 ++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 531

[PATCH 2/4] compositor: factor out RGB shader.

2012-04-20 Thread Gwenole Beauchesne
Simplify RGB shader code and split off common code that could be reused. This is preparatory work for YUV shaders. Signed-off-by: Gwenole Beauchesne --- src/compositor-wayland.c |2 +- src/compositor.c | 46 +- src/compositor.h |

[PATCH 1/4] compositor: prepare for multi-planar surfaces.

2012-04-20 Thread Gwenole Beauchesne
Make weston_surface::texture and ::surface an array, while keeping [0] for RGB surfaces. Signed-off-by: Gwenole Beauchesne --- src/compositor-drm.c | 14 --- src/compositor.c | 87 +++--- src/compositor.h |6 ++- 3 files changed, 73

[PATCH 0/4] Weston: add support for YUV buffers

2012-04-20 Thread Gwenole Beauchesne
Hi, Here is a first round of patches for supporting YUV buffers in Weston. It theoritically possible to support planar YUV from SHM buffers but I have only tested with VA-API on GenX (NV12, YUV 4:2:0 and 4:2:2). Some changes are needed in Mesa, but I wanted to get your opinion on this model first

Re: [PULL wayland] fd leak checks and a socket fallback

2012-04-20 Thread Kristian Høgsberg
Nice, that's all very clever :) I merged it as is, but I was wondering why you set errno to 0 in wl_os_socket_cloexec? If socket returns -1, will set errno, and if it doesn't, you don't need to look at errno. It's required for readdir and strtol, but shouldn't be necessary for socket. Kristian

Re: [PATCH 1/3] Change find_resource_for_surface to find_resource_for_client

2012-04-20 Thread Casey Dahlin
On Fri, Apr 20, 2012 at 05:28:00PM +0300, Tiago Vignatti wrote: > On 04/20/2012 04:36 PM, Kristian Høgsberg wrote: > >No, it's an awkward five line helper function that I don't want to > >make public API. > > yes, I meant find_resource_for_client. Or is there some fancier way > you're planning to

[PATCH 5/5] buffer: add helper accessors.

2012-04-20 Thread Gwenole Beauchesne
Signed-off-by: Gwenole Beauchesne --- src/wayland-server.c | 55 ++ src/wayland-server.h |6 + 2 files changed, 61 insertions(+), 0 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 8ca27bd..d672f83 100644 --- a/

[PATCH 4/5] shm: fill in base buffer layout.

2012-04-20 Thread Gwenole Beauchesne
Signed-off-by: Gwenole Beauchesne --- src/wayland-shm.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/wayland-shm.c b/src/wayland-shm.c index 7900ba1..bda1628 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -88,10 +88,15 @@ shm_pool_create_buf

[PATCH 3/5] buffer: bump version.

2012-04-20 Thread Gwenole Beauchesne
Signed-off-by: Gwenole Beauchesne --- protocol/wayland.xml |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index ba7fecc..556ae5b 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -209,7 +209,7 @@ -

[PATCH 2/5] buffer: add layout information.

2012-04-20 Thread Gwenole Beauchesne
Attach useful information to the buffer so that to determine its pixel format and how it is organized: line stride in bytes for each plane, and offset from base buffer to the corresponding plane. Signed-off-by: Gwenole Beauchesne --- src/wayland-server.h |1 + src/wayland-util.c | 67 +++

[PATCH 1/5] buffer: add generic buffer formats.

2012-04-20 Thread Gwenole Beauchesne
Add packed RGB (ARGB32, XRGB32), and planar YUV formats with interleaved U/V components (NV12), or three Y U V planes with various subsampling (YUV 4:1:0, 4:1:1, 4:2:0, 4:2:2, 4:4:4). Signed-off-by: Gwenole Beauchesne --- protocol/wayland.xml | 24 1 files changed, 24

[PATCH 0/5] Add generic buffer formats

2012-04-20 Thread Gwenole Beauchesne
Hi, This series adds generic buffer formats (at the wl_buffer level) and YUV formats in particular. I believe this is generally useful because even for SHM buffers, we could also represent YUV contents in there. e.g. gstreamer sink. Patch 1 adds the generic buffer types. Those are the most common

Re: [PATCH 1/3] Change find_resource_for_surface to find_resource_for_client

2012-04-20 Thread Tiago Vignatti
On 04/20/2012 04:36 PM, Kristian Høgsberg wrote: On Fri, Apr 20, 2012 at 5:23 AM, Tiago Vignatti wrote: On 04/20/2012 05:50 AM, cdah...@redhat.com wrote: From: Casey Dahlin This function has generic applications and should be made generic. this looks good. But we have already find_resour

[PULL wayland] fd leak checks and a socket fallback

2012-04-20 Thread Pekka Paalanen
Hi Kristian, finally I am getting the test framework up for my OS wrappers. I added automatic fd leak checks, and helpers for checking fd leaks through exec(). They have their sanity tests. The other feature in this series is the fallback for socket() and SOCK_CLOEXEC flag, which is not supported

Re: [PATCH 1/3] Change find_resource_for_surface to find_resource_for_client

2012-04-20 Thread Kristian Høgsberg
On Fri, Apr 20, 2012 at 5:23 AM, Tiago Vignatti wrote: > On 04/20/2012 05:50 AM, cdah...@redhat.com wrote: >> >> From: Casey Dahlin >> >> This function has generic applications and should be made generic. > > > this looks good. But we have already find_resource_for_surface in > libwayland-server,

Re: [PATCH v3] parser: be more picky for integer values

2012-04-20 Thread Tiago Vignatti
On 04/20/2012 12:02 PM, Pekka Paalanen wrote: On Fri, 16 Mar 2012 15:12:14 -0300 Tiago Vignatti wrote: It was silently accepting "-i=3", "-i=3/2", "--idle-time=*3" and similar unwanted type of arguments, not changing anything internally; this gives the wrong impression for the user. Now it exp

[PATCH 1/2 v3] screenshooter: Grab pixel data directly before buffer swap

2012-04-20 Thread Scott Moreau
--- clients/screenshot.c | 17 - protocol/screenshooter.xml |2 + src/compositor-drm.c | 18 + src/compositor-wayland.c | 18 + src/compositor-x11.c | 18 + src/compositor.c | 15 src/compositor.h | 13

Re: [PATCH 1/3] Change find_resource_for_surface to find_resource_for_client

2012-04-20 Thread Tiago Vignatti
On 04/20/2012 05:50 AM, cdah...@redhat.com wrote: From: Casey Dahlin This function has generic applications and should be made generic. this looks good. But we have already find_resource_for_surface in libwayland-server, it's just not exported. So I'd say this kind of modification should go

[PATCH 1/2 v2] screenshooter: Grab pixel data directly before buffer swap

2012-04-20 Thread Scott Moreau
--- clients/screenshot.c | 17 - protocol/screenshooter.xml |2 + src/compositor-drm.c | 18 + src/compositor-wayland.c | 18 + src/compositor-x11.c | 18 + src/compositor.c | 15 src/compositor.h | 13

[PATCH 2/2] screenshooter: Move buffer assembly to client side

2012-04-20 Thread Scott Moreau
--- clients/screenshot.c | 45 +++-- src/screenshooter.c | 44 +++- 2 files changed, 50 insertions(+), 39 deletions(-) diff --git a/clients/screenshot.c b/clients/screenshot.c index da22423..648d334 100644 --- a/

[PATCH 1/2] screenshooter: Grab pixel data directly before buffer swap

2012-04-20 Thread Scott Moreau
--- The majority of this patch is krh's, I just put it on top of master and added a mechanism so the client can know when the buffer copy has completed. clients/screenshot.c | 17 - protocol/screenshooter.xml |2 + src/compositor-drm.c | 18 + src/compositor-w

Re: [PATCH v3] parser: be more picky for integer values

2012-04-20 Thread Pekka Paalanen
On Fri, 16 Mar 2012 15:12:14 -0300 Tiago Vignatti wrote: > It was silently accepting "-i=3", "-i=3/2", "--idle-time=*3" and similar > unwanted type of arguments, not changing anything internally; this > gives the wrong impression for the user. Now it explicitly warns. > > Signed-off-by: Tiago Vi