mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 14:46:09 +02:00
Merge pull request #5529 from penpot/azazeln28-refactor-panning-perf
♻️ Refactor panning perf
This commit is contained in:
commit
4d4bf1edd1
7 changed files with 70 additions and 23 deletions
|
@ -70,9 +70,16 @@ pub unsafe extern "C" fn render_without_cache() {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn navigate() {
|
||||
pub unsafe extern "C" fn zoom() {
|
||||
let state: &mut Box<State<'_>> =
|
||||
unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
state.zoom();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn pan() {
|
||||
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
|
||||
state.navigate();
|
||||
state.pan();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue