Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Kirill Bulatov
46e31b17e6 Start researching Linux overdraws
Co-authored-by: Kate <work@localcc.cc>
2025-08-26 13:28:45 +03:00

View file

@ -27,6 +27,7 @@ use x11rb::{
xcb_ffi::XCBConnection, xcb_ffi::XCBConnection,
}; };
use std::sync::atomic::AtomicUsize;
use std::{ use std::{
cell::RefCell, ffi::c_void, fmt::Display, num::NonZeroU32, ops::Div, ptr::NonNull, rc::Rc, cell::RefCell, ffi::c_void, fmt::Display, num::NonZeroU32, ops::Div, ptr::NonNull, rc::Rc,
sync::Arc, sync::Arc,
@ -1432,6 +1433,11 @@ impl PlatformWindow for X11Window {
} }
fn draw(&self, scene: &Scene) { fn draw(&self, scene: &Scene) {
static counter: AtomicUsize = AtomicUsize::new(0);
dbg!(
"refresh!",
counter.fetch_add(1, std::sync::atomic::Ordering::Release) + 1
);
let mut inner = self.0.state.borrow_mut(); let mut inner = self.0.state.borrow_mut();
inner.renderer.draw(scene); inner.renderer.draw(scene);
} }