[PATCH] pixman-renderer: Use width/height_from_buffer for buffer transforms

Pekka Paalanen ppaalanen at gmail.com
Mon Apr 21 23:55:36 PDT 2014


On Mon, 21 Apr 2014 21:04:42 -0500
Jason Ekstrand <jason at jlekstrand.net> wrote:

> This fixes an issue in the pixman renderer where it would not render
> surfaces correctly if both wl_viewport and wl_surface.set_buffer_transform
> were used.
> 
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  src/pixman-renderer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/pixman-renderer.c b/src/pixman-renderer.c
> index b999343..4b321f3 100644
> --- a/src/pixman-renderer.c
> +++ b/src/pixman-renderer.c
> @@ -289,8 +289,8 @@ repaint_region(struct weston_view *ev, struct weston_output *output,
>  
>  	transform_apply_viewport(&transform, ev->surface);
>  
> -	fw = pixman_int_to_fixed(ev->surface->width);
> -	fh = pixman_int_to_fixed(ev->surface->height);
> +	fw = pixman_int_to_fixed(ev->surface->width_from_buffer);
> +	fh = pixman_int_to_fixed(ev->surface->height_from_buffer);
>  
>  	switch (vp->buffer.transform) {
>  	case WL_OUTPUT_TRANSFORM_FLIPPED:

Hi Jason,

this looks correct too, similarly to the other patch. Again proves,
that what is not tested, can be assumed broken. :-)


Thanks,
pq


More information about the wayland-devel mailing list