mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 14:27:21 +02:00
♻️ Refactor how rebuild_tiles works
This commit is contained in:
parent
fef342b489
commit
caf13eb774
8 changed files with 63 additions and 15 deletions
|
@ -1,10 +1,10 @@
|
|||
use skia_safe as skia;
|
||||
|
||||
mod debug;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
mod emscripten;
|
||||
mod math;
|
||||
mod mem;
|
||||
mod options;
|
||||
mod performance;
|
||||
mod render;
|
||||
mod shapes;
|
||||
|
@ -140,7 +140,11 @@ pub extern "C" fn set_view(zoom: f32, x: f32, y: f32) {
|
|||
render_state.viewbox.set_all(zoom, x, y);
|
||||
if zoom_changed {
|
||||
with_state!(state, {
|
||||
state.rebuild_tiles();
|
||||
if state.render_state.options.is_profile_rebuild_tiles() {
|
||||
state.rebuild_tiles();
|
||||
} else {
|
||||
state.rebuild_tiles_shallow();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue