1
0
Fork 0
forked from wry/wry

wayland: implement commit-timing-v1

This commit is contained in:
Julian Orth 2024-09-26 16:18:17 +02:00
parent d45aaffdb3
commit fac5445f2e
19 changed files with 434 additions and 15 deletions

View file

@ -13,6 +13,7 @@ use {
gfx_api::{AcquireSync, GfxContext, GfxError, GfxFramebuffer, GfxTexture, ReleaseSync},
ifs::wl_output::OutputId,
state::State,
time::Time,
utils::{
clonecell::CloneCell, copyhashmap::CopyHashMap, errorfmt::ErrorFmt, numcell::NumCell,
queue::AsyncQueue, syncqueue::SyncQueue,
@ -745,6 +746,8 @@ impl XBackend {
image.last_serial.set(serial);
if let Some(node) = self.state.root.outputs.get(&output.id) {
let now = Time::now_unchecked().nsec();
node.before_latch(now).await;
let res = self.state.present_output(
&node,
&image.fb.get(),