backend/drm: stop using surface size for BO

Stop using wlr_drm_surface.{width,height} to figure out the size of a
gbm_bo. In the future we'll stop using wlr_drm_plane.surf, so these will
be zero. Instead, rely on gbm_bo_get_{width,height}.
This commit is contained in:
Simon Ser 2020-12-18 16:24:36 +01:00
parent d9bbc416a6
commit c94728b53a
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 12 additions and 7 deletions

View file

@ -81,9 +81,11 @@ static bool legacy_crtc_commit(struct wlr_drm_backend *drm,
return false;
}
if (drmModeSetCursor(drm->fd, crtc->id,
gbm_bo_get_handle(cursor_fb->bo).u32,
cursor->surf.width, cursor->surf.height)) {
uint32_t cursor_handle = gbm_bo_get_handle(cursor_fb->bo).u32;
uint32_t cursor_width = gbm_bo_get_width(cursor_fb->bo);
uint32_t cursor_height = gbm_bo_get_height(cursor_fb->bo);
if (drmModeSetCursor(drm->fd, crtc->id, cursor_handle,
cursor_width, cursor_height)) {
wlr_drm_conn_log_errno(conn, WLR_DEBUG, "drmModeSetCursor failed");
return false;
}