1
0
Fork 0
forked from wry/wry

render: use explicit sync for framebuffers

This commit is contained in:
Julian Orth 2024-09-16 15:28:44 +02:00
parent 1bc344dcc2
commit 386ee5120f
15 changed files with 235 additions and 64 deletions

View file

@ -3,6 +3,7 @@ use {
backend::HardwareCursorUpdate,
cursor::{Cursor, KnownCursor, DEFAULT_CURSOR_SIZE},
fixed::Fixed,
gfx_api::{AcquireSync, ReleaseSync},
rect::Rect,
scale::Scale,
state::State,
@ -497,8 +498,14 @@ impl CursorUser {
}
if render {
let buffer = hc.get_buffer();
let res =
buffer.render_hardware_cursor(cursor.deref(), &self.group.state, scale, transform);
let res = buffer.render_hardware_cursor(
AcquireSync::Unnecessary,
ReleaseSync::Explicit,
cursor.deref(),
&self.group.state,
scale,
transform,
);
match res {
Ok(sync_file) => {
hc.set_sync_file(sync_file);