compositor-drm: Use drm_plane for cursor plane

Graphics / Wayland / Weston - Daniel Stone [collabora.com] - 17 January 2018 18:11 EST

Change the type of cursor_plane from a weston_plane (base tracking structure) to a drm_plane (wrapper containing additional DRM-specific details), and make it a dynamically-allocated pointer.

Using the standard drm_plane allows us to reuse code which already deals with drm_planes, e.g. a common cleanup function.

This patch introduces a 'special plane' helper, creating a drm_plane either from a real KMS plane when using universal planes, or a fake plane otherwise. Without universal planes, the cursor and primary planes are hidden from us; this helper allows us to pretend otherwise.

2ba17f4d compositor-drm: Use drm_plane for cursor plane
libweston/compositor-drm.c | 459 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 354 insertions(+), 105 deletions(-)

Upstream: cgit.freedesktop.org


  • Share