wl_surface: handle buffer release automatically
This commit is contained in:
parent
6bdd1ff6e7
commit
8f576f498e
5 changed files with 51 additions and 34 deletions
|
|
@ -598,6 +598,7 @@ fn schedule_async_upload(
|
|||
let Some(Some(buf)) = &pending.buffer else {
|
||||
return Ok(None);
|
||||
};
|
||||
let buf = &buf.buf;
|
||||
let Some(WlBufferStorage::Shm {
|
||||
mem,
|
||||
stride,
|
||||
|
|
@ -698,6 +699,7 @@ struct CommitDataCollector {
|
|||
impl CommitDataCollector {
|
||||
fn collect(&mut self, pending: &mut PendingState) {
|
||||
if let Some(Some(buffer)) = &pending.buffer {
|
||||
let buffer = &buffer.buf;
|
||||
if buffer.is_shm() {
|
||||
self.shm_uploads += 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue