diff options
author | Scott Anderson <scott@anderso.nz> | 2019-06-21 18:06:21 +1200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-06-22 11:58:33 +0300 |
commit | b3f42548d068996995490585e27e16c191b4a64c (patch) | |
tree | e8976f29dd273a1f127c16dd5a57c4fe6c6ea4d8 /include/backend/drm | |
parent | d80acadfd814ce022f3b2c5ad570551e622e1f66 (diff) |
backend/drm: Simplify object matching code
We originally used match_obj on planes, but this was largely
unnecessary. Instead, this assigns planes statically at startup.
Diffstat (limited to 'include/backend/drm')
-rw-r--r-- | include/backend/drm/drm.h | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index 99120852..bc1c2933 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -22,8 +22,6 @@ struct wlr_drm_plane { uint32_t type; uint32_t id; - uint32_t possible_crtcs; - struct wlr_drm_surface surf; struct wlr_drm_surface mgpu_surf; @@ -49,14 +47,15 @@ struct wlr_drm_crtc { // Legacy only drmModeCrtc *legacy_crtc; - union { - struct { - struct wlr_drm_plane *overlay; - struct wlr_drm_plane *primary; - struct wlr_drm_plane *cursor; - }; - struct wlr_drm_plane *planes[3]; - }; + struct wlr_drm_plane *primary; + struct wlr_drm_plane *cursor; + + /* + * We don't support overlay planes yet, but we keep track of them to + * give to DRM lease clients. + */ + size_t num_overlays; + uint32_t *overlays; union wlr_drm_crtc_props props; @@ -78,26 +77,6 @@ struct wlr_drm_backend { size_t num_crtcs; struct wlr_drm_crtc *crtcs; - size_t num_planes; - struct wlr_drm_plane *planes; - - union { - struct { - size_t num_overlay_planes; - size_t num_primary_planes; - size_t num_cursor_planes; - }; - size_t num_type_planes[3]; - }; - - union { - struct { - struct wlr_drm_plane *overlay_planes; - struct wlr_drm_plane *primary_planes; - struct wlr_drm_plane *cursor_planes; - }; - struct wlr_drm_plane *type_planes[3]; - }; struct wl_display *display; struct wl_event_source *drm_event; |