🎉 Improve performace for zoom and pan with wasm render

This commit is contained in:
Alejandro Alonso 2024-11-22 08:47:06 +01:00
parent 361c56fd9c
commit 0b5e915af9
4 changed files with 54 additions and 21 deletions

View file

@ -41,7 +41,13 @@ pub extern "C" fn init(width: i32, height: i32, debug: u32) {
#[no_mangle]
pub unsafe extern "C" fn render() {
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
state.render_all();
state.render_all(true);
}
#[no_mangle]
pub unsafe extern "C" fn render_without_cache() {
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
state.render_all(false);
}
#[no_mangle]