mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 20:26:10 +02:00
🎉 Improve performace for zoom and pan with wasm render
This commit is contained in:
parent
361c56fd9c
commit
0b5e915af9
4 changed files with 54 additions and 21 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue