[waffle] [PATCH 01/13] x11: straighten code flow

2016-05-16 Thread Emil Velikov
From: Emil Velikov Having goto statements jump over each other makes the code harder/more annoying to read. Signed-off-by: Emil Velikov --- src/waffle/x11/x11_window.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff

[waffle] [PATCH 02/13] egl: inline wegl_context_{init, teardown}() in the respective callers

2016-05-16 Thread Emil Velikov
From: Emil Velikov Seems like an overkill to keep them separate considering the caller and callee are just a single function call. Signed-off-by: Emil Velikov --- src/waffle/egl/wegl_context.c | 75

[waffle] [PATCH 05/13] all: remove 'self' NULL check from *_window_destroy()

2016-05-16 Thread Emil Velikov
From: Emil Velikov Analogous to previous commit Signed-off-by: Emil Velikov --- src/waffle/android/droid_window.c | 11 +++ src/waffle/cgl/cgl_window.m | 7 ++- src/waffle/gbm/wgbm_window.c| 7 ++-

[waffle] [PATCH 07/13] all: remove 'self' NULL check from *_config_destroy()

2016-05-16 Thread Emil Velikov
From: Emil Velikov Analogous to previous commit Signed-off-by: Emil Velikov --- src/waffle/cgl/cgl_config.m | 11 +++ src/waffle/egl/wegl_config.c | 7 ++- src/waffle/glx/glx_config.c | 7 ++-

[waffle] [PATCH 04/13] all: remove 'self' NULL check from *_display_destroy()

2016-05-16 Thread Emil Velikov
From: Emil Velikov Analogous to previous commit Signed-off-by: Emil Velikov --- src/waffle/android/droid_display.c | 3 --- src/waffle/cgl/cgl_display.m | 3 --- src/waffle/gbm/wgbm_display.c| 8 ++--

[waffle] [PATCH 00/13] Core waffle cleanups

2016-05-16 Thread Emil Velikov
Hi all, While looking at the gbm/egl I've noticed a few interesting bits. - We do NULL checking for values that are guaranteed by API to be non-NULL. - wcore_*_init does not need a return type, plus in some places we were not calling it in the correct time. - wcore_*_teardown is a simple

[waffle] [PATCH 2/4] egl: fold eglGetConfigAttrib() within wegl_config_choose()

2016-05-16 Thread Emil Velikov
Rather than having the call in multiple places and multiple times, just query the native visual id once and store it for later use. Signed-off-by: Emil Velikov --- src/waffle/egl/wegl_config.c | 7 +++ src/waffle/egl/wegl_config.h | 1 +

[waffle] [PATCH 3/4] gbm: factor out gbm_window_{init,teardown}

2016-05-16 Thread Emil Velikov
From: Emil Velikov We'll need then with next patch as we implement window_resize(). Signed-off-by: Emil Velikov --- src/waffle/gbm/wgbm_window.c | 69 +--- 1 file changed, 46 insertions(+), 23

[waffle] [PATCH 0/4] Implement gbm window_resize

2016-05-16 Thread Emil Velikov
Hi all, This is a respin of Emmanuel (linkmauve)'s work [1] without all the unneeded coping. On gbm one needs to teardown the old window (which this series does only if we can create the new one and make it current). Note: this adds a rather hacky looking link to the config in struct

[waffle] [PATCH 1/4] egl: fix build against old headers

2016-05-16 Thread Emil Velikov
From: Emil Velikov Namely add the EGL_CONTEXT_OPENGL_ROBUST_ACCESS define, if missing. Signed-off-by: Emil Velikov --- src/waffle/egl/wegl_context.c | 4 1 file changed, 4 insertions(+) diff --git a/src/waffle/egl/wegl_context.c

[waffle] [PATCH 4/4] gbm: implement window_resize

2016-05-16 Thread Emil Velikov
From: Emil Velikov Reuse the existing init/teardown functions to create a new window and nuke the old one on success. Note: as we need the original config, we keep a reference to it in struct wcore_config. Ideally there will be a generic way to query it.

[waffle] [PATCH 10/13] egl: tweak wegl_platform_init()

2016-05-16 Thread Emil Velikov
From: Emil Velikov Drop the goto label and bail directly from the macro. The current strange construct has gotten us once, so we might as well try to avoid it for the future. Signed-off-by: Emil Velikov --- src/waffle/egl/wegl_platform.c

[waffle] [PATCH 11/13] wayland: tweak wayland_wrapper_init()

2016-05-16 Thread Emil Velikov
From: Emil Velikov Analogous to previous commit. Signed-off-by: Emil Velikov --- src/waffle/wayland/wayland_wrapper.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git

[waffle] [PATCH 12/13] android: remove 'self' NULL checks

2016-05-16 Thread Emil Velikov
From: Emil Velikov Similar to earlier commits - the API layer already does these for us. Signed-off-by: Emil Velikov --- src/waffle/android/droid_window.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git

[waffle] [PATCH 13/13] linux: remove 'self' NULL check

2016-05-16 Thread Emil Velikov
From: Emil Velikov All the callers already ensure this never happens. Signed-off-by: Emil Velikov --- src/waffle/linux/linux_platform.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/waffle/linux/linux_platform.c

Re: [waffle] [PATCH 00/13] Core waffle cleanups

2016-05-16 Thread Emil Velikov
On 16 May 2016 at 11:54, Emil Velikov wrote: > Hi all, > > While looking at the gbm/egl I've noticed a few interesting bits. > - We do NULL checking for values that are guaranteed by API to be > non-NULL. > - wcore_*_init does not need a return type, plus in some