1
0
Fork 0
forked from wry/wry

drm: preserve GbmBos while they are in use

This commit is contained in:
Julian Orth 2024-05-08 23:10:22 +02:00
parent 760658522c
commit 110f45fef7
5 changed files with 25 additions and 7 deletions

View file

@ -19,7 +19,7 @@ use {
},
video::{
drm::{ConnectorType, Drm, DrmError, DrmVersion},
gbm::{GbmDevice, GbmError, GBM_BO_USE_RENDERING},
gbm::{GbmBo, GbmDevice, GbmError, GBM_BO_USE_RENDERING},
},
wire_xcon::{
ChangeProperty, ChangeWindowAttributes, ConfigureNotify, CreateCursor, CreatePixmap,
@ -437,6 +437,7 @@ impl XBackend {
};
*image = Some(XImage {
pixmap: Cell::new(pixmap),
_bo: bo,
fb: CloneCell::new(fb),
tex: CloneCell::new(tex),
idle: Cell::new(true),
@ -1023,6 +1024,7 @@ struct XOutput {
struct XImage {
pixmap: Cell<u32>,
_bo: GbmBo,
fb: CloneCell<Rc<dyn GfxFramebuffer>>,
tex: CloneCell<Rc<dyn GfxTexture>>,
idle: Cell<bool>,