mirror of
https://github.com/penpot/penpot.git
synced 2025-05-26 04:56:14 +02:00
🎉 Add shapes buffer to improve memory allocation
This commit is contained in:
parent
23bde76192
commit
03b4fe3558
9 changed files with 122 additions and 36 deletions
|
@ -842,9 +842,12 @@
|
|||
|
||||
(defn initialize
|
||||
[base-objects zoom vbox background]
|
||||
(let [rgba (sr-clr/hex->u32argb background 1)]
|
||||
(let [rgba (sr-clr/hex->u32argb background 1)
|
||||
shapes (into [] (vals base-objects))
|
||||
total-shapes (count shapes)]
|
||||
(h/call wasm/internal-module "_set_canvas_background" rgba)
|
||||
(h/call wasm/internal-module "_set_view" zoom (- (:x vbox)) (- (:y vbox)))
|
||||
(h/call wasm/internal-module "_init_shapes_pool" total-shapes)
|
||||
(set-objects base-objects)))
|
||||
|
||||
(def ^:private canvas-options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue