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

Derek Foreman derekf at osg.samsung.com
Thu Oct 15 08:24:48 PDT 2015


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;
-- 
2.6.1



More information about the wayland-devel mailing list