Re: [RFC weston 13/16] compositor: Add a function to test if images transformed by a matrix should be bilinearly filtered

2014-09-26 Thread Bill Spitzak
Actually the third column is irrelevant if you know the source is a flat plane at z=0, which is what the wayland buffers are. So only 9 numbers in the matrix need to be examined: |sx 0 ? tx| |0 sy ? ty| |? ? ? ?| |0 0 ? 1| or |0 sx ? tx| |sy 0 ? ty| |? ? ? ?| |0 0 ? 1|

Re: [RFC weston 00/16] Replace existing transformation code with matrix operations

2014-09-26 Thread Bill Spitzak
It is great to see this! On 09/26/2014 02:10 PM, Derek Foreman wrote: 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. Hopef

Re: [RFC weston 13/16] compositor: Add a function to test if images transformed by a matrix should be bilinearly filtered

2014-09-26 Thread Bill Spitzak
90 degree rotation about x or y will require filtering. You test y scale twice, must be a typo. I think you intended to test z, but in fact z scale is not relevant so you should not test it at all. Translation by non-integer will also require filtering. I recommend instead of checking the rot

[RFC weston 16/16] compositor: Remove weston_transformed_rect() and weston_transformed_coord()

2014-09-26 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 |

[RFC weston 08/16] compositor: add weston_matrix_transform_rect() and use it for where appropriate

2014-09-26 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

[RFC weston 04/16] zoom: Use pixels instead of GL coordinates

2014-09-26 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

[RFC weston 01/16] weston_surface: Add surface-to-buffer and buffer-to-surface matrices

2014-09-26 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 a219766..136cc83 100644 --- a/src/compositor.c +++ b/src/compositor.c @@

[RFC weston 15/16] compositor-drm: use weston_surface_to_buffer_rect instead of weston_transformed_rect

2014-09-26 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 +

[RFC weston 07/16] compositor: Move weston_matrix_transform_region to compositor.c and export it

2014-09-26 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 -

[RFC weston 09/16] compositor: use matrix transforms for surface_to_buffer functions

2014-09-26 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

[RFC weston 02/16] gl-renderer: Call glViewport after the context is made current

2014-09-26 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 f7f29b3..8684180 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -870,15 +870,15 @@ gl_renderer_repaint_output(struct weston_

[RFC weston 12/16] matrix: Add functions to decompose a transformation matrix into basic operations

2014-09-26 Thread Derek Foreman
Adds an internal weston_matrix_decompose() which takes a matrix and decomposes translation, rotation, shear and scale parameters to re-create it. This information is cached the first time any helper functions are used to extract these values and dirtied whenever a matrix multiplication takes plac

[RFC weston 14/16] renderers: use weston_matrix_needs_filtering to choose filter parameters in gl and pixman renderers

2014-09-26 Thread Derek Foreman
Note: This causes a performance drop when zoomed under pixman. --- src/gl-renderer.c | 6 +++--- src/pixman-renderer.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index f3aeff2..d42108d 100644 --- a/src/gl-renderer.c +++ b/src

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

2014-09-26 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. ---

[RFC weston 11/16] compositor: Remove weston_transformed_region

2014-09-26 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

[RFC weston 03/16] Use pixel coordinates for weston_output.matrix

2014-09-26 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(-

[RFC weston 06/16] pixman-renderer: Use output->matrix for region transformations and enable output zoom

2014-09-26 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

[RFC weston 13/16] compositor: Add a function to test if images transformed by a matrix should be bilinearly filtered

2014-09-26 Thread Derek Foreman
If a transformation matrix causes a scale or a rotation not a multiple of 90 degrees then textures rendered with it would benefit from bilinear filtering. weston_matrix_needs_filtering() checks for this. --- src/compositor.c | 23 +++ src/compositor.h | 3 +++ 2 files changed

[RFC weston 10/16] compositor: use weston_matrix_transform_region for overlay setup

2014-09-26 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 e4496e7..cd999e9 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -906,17 +906,13 @@ drm_output_prepare_overlay_view(struc

[RFC weston 00/16] Replace existing transformation code with matrix operations

2014-09-26 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

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-26 Thread Bill Spitzak
On 09/26/2014 05:31 AM, Matthieu Gautier wrote: Client can't know what is the transformation matrix applied to the surface. So it can't calculate the raw event from the absolute position of the pointer. So we need to send relative/raw/untransformed events on top of absolute position. We cannot

Re: xdg shell status and gaps

2014-09-26 Thread Jason Ekstrand
On Fri, Sep 26, 2014 at 7:38 AM, Jasper St. Pierre wrote: > > > On Fri, Sep 26, 2014 at 4:07 AM, Carlos Garnacho > wrote: > >> Hey, >> >> On Thu, Sep 25, 2014 at 7:30 PM, Matthias Clasen < >> matthias.cla...@gmail.com> wrote: >> >>> On Thu, Sep 25, 2014 at 10:32 AM, Jasper St. Pierre >>> wrote:

Re: xdg shell status and gaps

2014-09-26 Thread Jasper St. Pierre
On Fri, Sep 26, 2014 at 4:07 AM, Carlos Garnacho wrote: > Hey, > > On Thu, Sep 25, 2014 at 7:30 PM, Matthias Clasen < > matthias.cla...@gmail.com> wrote: > >> On Thu, Sep 25, 2014 at 10:32 AM, Jasper St. Pierre >> wrote: >> >> >> >> Anyway, here's the list: >> > > > > >> >> >> >> >> >> 7) Root

Re: [PATCH weston 1/3] Introduce pointer lock interface

2014-09-26 Thread Matthieu Gautier
Le 25/09/2014 21:32, Bill Spitzak a écrit : On 09/25/2014 06:41 AM, Matthieu Gautier wrote: How do you handle transformed surfaces ? If a surface is scale by 0.5 for example. Absolute cursor seems to move twice its speed from client pov. Do we want game to turn player position quickly in th

Re: xdg shell status and gaps

2014-09-26 Thread Carlos Garnacho
Hey, On Thu, Sep 25, 2014 at 7:30 PM, Matthias Clasen wrote: > On Thu, Sep 25, 2014 at 10:32 AM, Jasper St. Pierre > wrote: > > > >> Anyway, here's the list: > > > > >> > >> 7) Root window drop > > > > > > When is this useful? > > One place where it is used is when dragging tabs out of a wi