1
0
Fork 0
forked from wry/wry

wl_surface: handle buffer release automatically

This commit is contained in:
Julian Orth 2026-02-28 02:19:45 +01:00
parent 6bdd1ff6e7
commit 8f576f498e
5 changed files with 51 additions and 34 deletions

View file

@ -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;
}