Recognizing wl_display pointer for EGL (Re: Smart comparing of wl_display_interfaces)

2014-10-16 Thread Pekka Paalanen
On Thu, 16 Oct 2014 10:40:20 +0300 Pekka Paalanen wrote: > On Thu, 16 Oct 2014 09:46:39 +0300 > Pekka Paalanen wrote: > > > On Wed, 15 Oct 2014 22:44:25 +0400 > > Dmitry Cherkassov wrote: > > > > > Hi list! > > > > > > The definition of wl_display_interface symbol can come from > > > libwayl

Re: [PATCH weston] smoke: Don't commit an xdg_surface with a NULL buffer

2014-10-16 Thread Jasper St. Pierre
Wayland does not have child windows. On Oct 16, 2014 8:22 PM, "Bill Spitzak" wrote: > On 10/16/2014 08:03 PM, Jasper St. Pierre wrote: > > Are there any use cases for hiding a window while keeping it in the same >> place? We couldn't think of any on IRC. >> > > There may be a desire to do that w

Re: [PATCH weston] smoke: Don't commit an xdg_surface with a NULL buffer

2014-10-16 Thread Bill Spitzak
On 10/16/2014 08:03 PM, Jasper St. Pierre wrote: Are there any use cases for hiding a window while keeping it in the same place? We couldn't think of any on IRC. There may be a desire to do that with child windows. If a client has a button that turns a child window on/off, and the user moves

Re: [PATCH weston] smoke: Don't commit an xdg_surface with a NULL buffer

2014-10-16 Thread Jasper St. Pierre
On Tue, Oct 14, 2014 at 2:45 AM, Giulio Camuffo wrote: > 2014-10-13 4:57 GMT+03:00 Jasper St. Pierre : > > Committing to an xdg_surface with a NULL buffer is currently illegal in > > the mutter implementation, so this simply causes the client to error and > > exit. > > The patch looks good to me.

[PATCH weston] gl-renderer: compress pixman bands to simplify geometry

2014-10-16 Thread Derek Foreman
Pixman uses y-x banded rectangles to represent regions. We use these y-x banded rectangles to generate triangle fans, resulting in more geometry than strictly necessary to draw the screen. This patch combines the bands to reduce geometry for complex scenes. --- src/gl-renderer.c | 67 +++

Re: [PATCH weston v5 3/3 1/2] Implement data_device interface destructor

2014-10-16 Thread Derek Foreman
On 13/10/14 12:06 AM, kabeer khan wrote: > data_device : change version while initializing data_device_manager interface > and data_device interface > > Signed-off-by: kabeer khan > --- > src/data-device.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git

Re: [PATCH weston v5 2/3] Implement data_device interface destructor

2014-10-16 Thread Derek Foreman
I apologize in advance for only commenting on the whitespace :) On 13/10/14 12:05 AM, kabeer khan wrote: > window : compare version and call appropriate destructor > > Signed-off-by: kabeer khan > --- > clients/window.c | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) >

[PATCH 2/2] Support for adjusting socket access rights to allow group of users to connect to the socket.

2014-10-16 Thread Imran Zaman
This is used for nested compositor architectures. Signed-off-by: Imran Zaman --- src/wayland-server.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/wayland-server.c b/src/wayland-server.c index 09e8903..721fabe 100644 --- a/src/wayland-server.c +++ b/src/wa

[PATCH 1/2] Support specifying custom directories for the client and server sockets through environment variables.

2014-10-16 Thread Imran Zaman
This is in order to support nested compositor architectures where system compositor using drm-backend is shared among multiple child compositors using wayland-backend. Signed-off-by: Imran Zaman --- src/wayland-client.c | 5 - src/wayland-server.c | 5 - 2 files changed, 8 insertions(+),

[PATCH v2] wayland-util: added wl_strtol/wl_strtoul utility functions

2014-10-16 Thread Imran Zaman
strtol/strtoul utility functions are used extensively in weston/wayland, and are not bug-free in their current form. To avoid definition in weston and wayland, its wrapped in functions with appropriate input and output checks. Test cases are also updated. Signed-off-by: Imran Zaman --- src/scann

[PATCH weston v2 16/20] compositor: use weston_matrix_transform for weston_output_transform_coordinate

2014-10-16 Thread Derek Foreman
We can greatly simplify weston_output_transform_coordinate now by simply multiplying by the output matrix and converting the result to fixed point. --- src/compositor.c | 62 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/src

[PATCH weston v2 10/20] compositor: use weston_matrix_transform_region for overlay setup

2014-10-16 Thread Derek Foreman
--- src/compositor-drm.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 07b83a7..c997c26 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -919,17 +919,13 @@ drm_output_prepare_overlay_view(struc

[PATCH weston v2 20/20] compositor-drm: use weston_view_to_output_matrix() to test plane viability

2014-10-16 Thread Derek Foreman
Instead of comparing buffer transforms to output transforms we now use weston_view_to_output_matrix() and weston_matrix_to_transform() to test if we can use a drm plane. We no longer test scaling, since the drm plane api supports scaling. Unfortunately the drmSetPlane() call is far from the viabil

[PATCH weston v2 06/20] pixman-renderer: Use output->matrix for region transformations and enable output zoom

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand --- src/pixman-renderer.c | 70 +++ 1 file changed, 60 insertions(+), 10 deletions(-) diff --git a/src/pixman-renderer.c b/src/pixman-renderer.c index 18b6476..d3650d1 100644 --- a/src/pixman-renderer.c +++ b/src/pixman-render

[PATCH weston v2 07/20] compositor: Move weston_matrix_transform_region to compositor.c and export it

2014-10-16 Thread Derek Foreman
We're going to use this to replace much of the other transform code so it's no longer just relevant to pixman-renderer.c --- src/compositor.c | 51 +++ src/compositor.h | 4 src/pixman-renderer.c | 51 -

[PATCH weston v2 19/20] renderers: use weston_view_to_output_matrix() in renderers

2014-10-16 Thread Derek Foreman
We now use this function in the gl renderer to determine if linear filtering is required, and in the pixman renderer to set up the image transformation. --- src/gl-renderer.c | 9 ++--- src/pixman-renderer.c | 14 +- 2 files changed, 3 insertions(+), 20 deletions(-) diff --gi

[PATCH weston v2 14/20] compositor-drm: use weston_surface_to_buffer_rect instead of weston_transformed_rect

2014-10-16 Thread Derek Foreman
The weston_transformed_rect() call should have the same result as weston_surface_to_buffer_rect(). Also, this mix of fixed, float, and int is difficult to follow and I don't trust it, so just convert to fixed for the plane API at the end of the calculation. --- src/compositor-drm.c | 34 +

[PATCH weston v2 15/20] compositor: Remove weston_transformed_rect() and weston_transformed_coord()

2014-10-16 Thread Derek Foreman
The last caller of weston_transformed_rect() has been replaced so we can remove weston_transformed_rect() - since it was the last caller of weston_transformed_coord() we can get rid of that too. --- src/compositor.c | 80 src/compositor.h |

[PATCH weston v2 09/20] compositor: use matrix transforms for surface_to_buffer functions

2014-10-16 Thread Derek Foreman
Now that we have weston_matrix_transform and appropriate matrices we can use that instead of weston_transformed_coord + scaler_surface_to_buffer. scaler_surface_to_buffer no longer has users, so remove it. --- src/compositor.c | 41 - 1 file changed, 4 inse

[PATCH weston v2 11/20] compositor: Remove weston_transformed_region

2014-10-16 Thread Derek Foreman
Replace all uses of weston_transform_region with weston_matrix_transform_region, then remove the function completely. --- src/compositor-wayland.c | 8 ++--- src/compositor-x11.c | 8 + src/compositor.c | 92 src/compositor.h

[PATCH weston v2 13/20] renderers: use weston_matrix_needs_filtering to choose filter parameters in gl and pixman renderers

2014-10-16 Thread Derek Foreman
Note: This causes a performance drop when zoomed under pixman. Also, pixman has clever optimization algorithms to switch from BILINEAR to NEAREST automatically when it detects they'll have the same result - we still do our own test here because the pixman check misses a few opportunities when the

[PATCH weston v2 18/20] compositor: add weston_view_to_output_matrix()

2014-10-16 Thread Derek Foreman
New function that creates a matrix that can transform buffer co-ordinates to output co-ordinates (or the inverse of that matrix). --- src/compositor.c | 19 +++ src/compositor.h | 6 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compo

[PATCH weston v2 17/20] compositor: Add weston_matrix_to_transform function

2014-10-16 Thread Derek Foreman
This function examines a matrix to see if it can be built with simple scale + translate + wl_output_transform enum. --- src/compositor.c | 57 src/compositor.h | 5 + 2 files changed, 62 insertions(+) diff --git a/src/compositor.c b/sr

[PATCH weston v2 03/20] Use pixel coordinates for weston_output.matrix

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand Previously, weston_output.matrix was in GL coordinates and therefore only really useful for the GL backend. --- src/compositor.c | 106 -- src/gl-renderer.c | 14 +++- 2 files changed, 52 insertions(+), 68 deletions(-

[PATCH weston v2 05/20] pixman-renderer: Add a weston_matrix_to_pixman_transform function and simplify the buffer-to-output matrix computation

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand Now that we have a buffer-to-surface matrix and the global-to-output matrix is in pixels, we can remove a large chunk of confusing code from the pixman renderer. Hopefully, having this stuff in weston core will keep the pixman renderer from gettin broken quite as often. ---

[PATCH weston v2 04/20] zoom: Use pixels instead of GL coordinates

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand Previously, the zoom functions used GL coordinates natively which doesn't work with the new output matrix calculations. This changes zoom to work in pixel coordinates to match the new output matrix format. This also cleans up the math in the zoom code substantially. --- sr

[PATCH weston v2 08/20] compositor: add weston_matrix_transform_rect() and use it where appropriate

2014-10-16 Thread Derek Foreman
New function that transforms a pixman_box32_t rectangle by a matrix. Since pixman rectangles are represented by 2 corners, non-90 degree rotations can't be properly represented. This function gives the axis aligned rectangle that encloses the rotated rectangle. We use this for matrix_transform_r

[PATCH weston v2 12/20] compositor: Add a function to test if images transformed by a matrix should be bilinearly filtered

2014-10-16 Thread Derek Foreman
If a transformation matrix causes a scale, a rotation not a multiple of 90 degrees or a non-integer translation then textures rendered with it would benefit from bilinear filtering. This test is done in a lazy fashion by examining elements of the matrix to check for a simple pattern that indicates

[PATCH weston v2 01/20] weston_surface: Add surface-to-buffer and buffer-to-surface matrices

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand --- src/compositor.c | 84 src/compositor.h | 6 2 files changed, 90 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 4540911..c85cf2e 100644 --- a/src/compositor.c +++ b/src/compositor.c @@

[PATCH weston v2 00/20] Replace existing transformation code with matrix operations

2014-10-16 Thread Derek Foreman
This is also available at https://github.com/ManMower/weston/commits/transforms The goal of this patch set is to remove much of the bulky switch statement based transform code and replace it with matrix multiplication. Hopefully this will result in a more maintainable pixman renderer due to the r

[PATCH weston v2 02/20] gl-renderer: Call glViewport after the context is made current

2014-10-16 Thread Derek Foreman
From: Jason Ekstrand --- src/gl-renderer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index 076c242..d54928b 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -867,15 +867,15 @@ gl_renderer_repaint_output(struct weston_

Re: [PATCH wayland] wl_strtol and wl_strtoul utility functions are added (inlined patch)

2014-10-16 Thread Imran Zaman
Here are my comments: Giulio Camuffo: if we copy-paste the same code to weston as well, means we have to write tests etc for two functions in weston as well; and it will come with maintenance overhead without any benefit of hiding the APIs in wayland (I can take the responsibility of maintaining th