Re: [PATCH weston] xwm: Fix opaque region system.

2012-11-23 Thread Kristian Høgsberg
On Sat, Nov 24, 2012 at 03:56:25AM +1100, Daniel Stone wrote: > Hi Pekka, > > > On 23 November 2012 18:35, Pekka Paalanen wrote: > > > \Weston_surface:opaque is referenced only in the transform_disable() > > path, because we never bothered to write an algorithm for the > > transform_enable() pa

Re: [PATCH weston 2/2] compositor: Move clearing of primary plane damage to the backends

2012-11-23 Thread Kristian Høgsberg
On Fri, Nov 23, 2012 at 03:40:18PM +0200, Pekka Paalanen wrote: > On Thu, 22 Nov 2012 15:57:00 +0200 > Ander Conselvan de Oliveira > wrote: > > > Backends may move surfaces to different planes, in which case damage is > > generated in the primary plane. This damage is usually passed to the > > re

Re: [PATCH wayland] doc: Fix typos

2012-11-23 Thread Kristian Høgsberg
On Thu, Nov 22, 2012 at 06:09:32PM -0200, Tiago Vignatti wrote: > Signed-off-by: Tiago Vignatti > --- > protocol/wayland.xml |2 +- > src/wayland-client.c |4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Thanks, applied. Kristian > diff --git a/protocol/wayland.xml b/protoco

Re: [PATCH wayland] client: Add an entry point for dispatching a queue without blocking

2012-11-23 Thread Kristian Høgsberg
On Thu, Nov 22, 2012 at 03:34:48PM +0200, Ander Conselvan de Oliveira wrote: > On the client side EGL, all the wl_buffer.release events need to be > processed before buffer allocation, otherwise a third buffer might > be allocated unnecessarily. However, the buffer allocation should > not block in

Re: [PATCH mesa] egl/wayland: Dispatch the event queue before get_buffers

2012-11-23 Thread Kristian Høgsberg
On Thu, Nov 22, 2012 at 03:34:49PM +0200, Ander Conselvan de Oliveira wrote: > When a client frame callback is executed and the client starts rendering > again, the egl event queue might not have been dispatched so that the > buffer release event for the previous frame hasn't been processed. In > t

Re: [PATCH weston 2/2] compositor: Move clearing of primary plane damage to the backends

2012-11-23 Thread Kristian Høgsberg
On Thu, Nov 22, 2012 at 03:57:00PM +0200, Ander Conselvan de Oliveira wrote: > Backends may move surfaces to different planes, in which case damage is > generated in the primary plane. This damage is usually passed to the > renderer, but in some cases the backend may decide to not render > anything

Re: [PATCH weston 1/2] compositor-drm: Add debug binding for toggling sprites

2012-11-23 Thread Kristian Høgsberg
On Thu, Nov 22, 2012 at 03:56:59PM +0200, Ander Conselvan de Oliveira wrote: > While at it, consolidate all the bindings we already have into one > single function. Thanks - and consolidating makes a lot of sense. Committed. Kristian > --- > src/compositor-drm.c | 31 ++--

Re: [PATCH weston] xwm: Fix opaque region system.

2012-11-23 Thread Daniel Stone
Hi Pekka, On 23 November 2012 18:35, Pekka Paalanen wrote: > \Weston_surface:opaque is referenced only in the transform_disable() > path, because we never bothered to write an algorithm for the > transform_enable() path. A pixman region deals with axis-aligned > rectangles, and the conversion f

[PATCH weston 8/8] clients: destroy wl_registry on exit

2012-11-23 Thread Pekka Paalanen
Plug an insignificant memory leak in demo programs that bother to clean up at all. Signed-off-by: Pekka Paalanen --- clients/simple-egl.c |1 + clients/simple-shm.c |1 + clients/window.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/clients/simple-egl.c b/

[PATCH weston 7/8] compositor: move texture_damage into renderer private

2012-11-23 Thread Pekka Paalanen
Only the gl_renderer uses this field. Signed-off-by: Pekka Paalanen --- src/compositor.c |3 --- src/compositor.h |1 - src/gl-renderer.c | 15 +-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 2b55b1e..c45a248 1

[PATCH weston 5/8] compositor: add early wl_buffer.release

2012-11-23 Thread Pekka Paalanen
A client can reliably avoid allocating a second buffer per surface, if the compositor sends the wl_buffer.release event before the frame callback. To enable clients' single-buffering, release the wl_buffer early if possible. Otherwise clients will double-buffer. Releasing early is not possible, if

[PATCH weston 6/8] compositor: move pitch into renderer private

2012-11-23 Thread Pekka Paalanen
It is not used by anything but the gl-renderer. Signed-off-by: Pekka Paalanen --- src/compositor.c |1 - src/compositor.h |1 - src/gl-renderer.c | 14 -- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 224e30d..2b5

[PATCH weston 3/8] compositor-drm: use weston_buffer_reference()

2012-11-23 Thread Pekka Paalanen
Convert the manual reference handling into weston_buffer_reference() calls. Signed-off-by: Pekka Paalanen --- src/compositor-drm.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 142faa5..923b3b2 100644 --- a/s

[PATCH weston 4/8] gl: take, hold, and release a buffer reference

2012-11-23 Thread Pekka Paalanen
Instead of relying on the compositor core to keep the wl_buffer around and unreleased, take a new reference to it in gl-renderer. This makes sure in the future, that the gl-renderer always has the buffer at hand, client misbehaviour excluded. The reference is taken in the attach callback, and rele

[PATCH weston 2/8] compositor: add and export weston_buffer_reference()

2012-11-23 Thread Pekka Paalanen
The wl_buffer reference counting API has been inconsistent. You would manually increment the refcount and register a destroy listener, as opposed to calling weston_buffer_post_release(), which internally decremented the refcount, and then removing a list item. Replace both cases with a single func

[PATCH weston 1/8] compositor: do not release if re-attaching buffer

2012-11-23 Thread Pekka Paalanen
If a client called wl_surface.attach with the same wl_buffer as previously, the compositor would mistakenly send a release on that buffer. This will cause problems only when clients start to properly use the wl_buffer.release event. Do not send wl_buffer.release if the same buffer is attached agai

Re: [PATCH weston 2/2] compositor: Move clearing of primary plane damage to the backends

2012-11-23 Thread Pekka Paalanen
On Thu, 22 Nov 2012 15:57:00 +0200 Ander Conselvan de Oliveira wrote: > Backends may move surfaces to different planes, in which case damage is > generated in the primary plane. This damage is usually passed to the > renderer, but in some cases the backend may decide to not render > anything (tha

Re: [PATCH v3 xserver 2/2] xwayland: Cache globals to avoid multiple registry objects

2012-11-23 Thread Ander Conselvan de Oliveira
On 11/22/2012 10:08 PM, Tiago Vignatti wrote: Signed-off-by: Tiago Vignatti --- Hi Kristian, I guess that was the idea we discussed on IRC? I kept the same order of the interfaces being bound, without thinking whether their were the most efficient or something; we we'll have to overhaul the WM

Re: [PATCH weston] xwm: Fix opaque region system.

2012-11-23 Thread Scott Moreau
Hi Pekka, Thanks for the review and detailed explanation. On Fri, Nov 23, 2012 at 12:35 AM, Pekka Paalanen wrote: > On Thu, 22 Nov 2012 15:35:13 -0700 > Scott Moreau wrote: > > > Since surface.commit was introduced, opqaue regions are stored in a > pending > > variable that isn't used until sur