[PATCH weston] compositor-drm: fix cursor size test in drm_assign_planes

Derek Foreman derekf at osg.samsung.com
Thu Oct 15 08:41:11 PDT 2015


Pushed this one with Daniel's review from phabricator.

https://phabricator.freedesktop.org/T3361

(I think we keep the ticket open until we resolve the rest of the issue
- incorrectly promoting xrgb and stuff with opaque regions to cursor planes)

If this wasn't so trivial I'd be inclined to wait a little longer so
people not paying attention to phabricator would have a better change to
review.

On 15/10/15 10:24 AM, Derek Foreman wrote:
> In commit 70d337dfd we changed one cursor size test from a hard coded 64,64
> to the actual device provided width, height.
> 
> The test in drm_assign_planes remained fixed at 64, 64.
> 
> The simple-shm test ended up being small enough to fit into a cursor plane
> by one test, but too large by the test in drm_assign_planes.  We'd assign
> to the cursor plane but not keep a reference.
> 
> weston-simple-shm would disappear and be replaced with the previous
> cursor image.
> 
> This partially "fixes" T3361.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
>  src/compositor-drm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 03c672e..36c3b3e 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -1245,7 +1245,8 @@ drm_assign_planes(struct weston_output *output_base)
>  		if (b->use_pixman ||
>  		    (es->buffer_ref.buffer &&
>  		    (!wl_shm_buffer_get(es->buffer_ref.buffer->resource) ||
> -		     (ev->surface->width <= 64 && ev->surface->height <= 64))))
> +		     (ev->surface->width <= b->cursor_width &&
> +		      ev->surface->height <= b->cursor_height))))
>  			es->keep_buffer = true;
>  		else
>  			es->keep_buffer = false;
> 



More information about the wayland-devel mailing list