Start researching Linux overdraws
Co-authored-by: Kate <work@localcc.cc>
This commit is contained in:
parent
b249593abe
commit
46e31b17e6
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue