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

@ -635,13 +635,17 @@ impl WindowData {
return;
};
let res = buf
.fb
.render_custom(self.scale.get(), Some(&Color::from_gray(0)), &mut |r| {
let res = buf.fb.render_custom(
AcquireSync::Implicit,
ReleaseSync::Implicit,
self.scale.get(),
Some(&Color::from_gray(0)),
&mut |r| {
if let Some(content) = self.content.get() {
content.render_at(r, 0.0, 0.0)
}
});
},
);
if let Err(e) = res {
log::error!("Could not render frame: {}", ErrorFmt(e));
return;