Skip to content

Commit

Permalink
Drop GbmDevice in the end
Browse files Browse the repository at this point in the history
The `GbmDevice` must be destroyed after destroying all the objects
associated with it.
  • Loading branch information
kchibisov authored and YaLTeR committed Oct 27, 2023
1 parent 64ac316 commit 345428b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/backend/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ type GbmDrmCompositor = DrmCompositor<
struct OutputDevice {
id: dev_t,
token: RegistrationToken,
drm: DrmDevice,
gbm: GbmDevice<DrmDeviceFd>,
gles: GlesRenderer,
formats: HashSet<DrmFormat>,
drm_scanner: DrmScanner,
surfaces: HashMap<crtc::Handle, Surface>,
dmabuf_state: DmabufState,
dmabuf_global: DmabufGlobal,
// SAFETY: drop after all the objects used with them are dropped.
// See https://github.com/Smithay/smithay/issues/1102.
drm: DrmDevice,
gbm: GbmDevice<DrmDeviceFd>,
}

#[derive(Debug, Clone, Copy)]
Expand Down

0 comments on commit 345428b

Please sign in to comment.