mirror of
https://github.com/penpot/penpot.git
synced 2025-06-27 11:17:01 +02:00
🐛 Avoid unnecesary clone call
This commit is contained in:
parent
55d21761fc
commit
b2d6342422
3 changed files with 7 additions and 3 deletions
|
@ -33,7 +33,9 @@
|
|||
const canvas = document.getElementById("canvas");
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
const shapes = 1000;
|
||||
|
||||
const params = new URLSearchParams(document.location.search);
|
||||
const shapes = params.get("shapes") || 1000;
|
||||
|
||||
initWasmModule().then(Module => {
|
||||
init(Module);
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
const canvas = document.getElementById("canvas");
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
const shapes = 1000;
|
||||
|
||||
const params = new URLSearchParams(document.location.search);
|
||||
const shapes = params.get("shapes") || 1000;
|
||||
|
||||
initWasmModule().then(Module => {
|
||||
init(Module);
|
||||
|
|
|
@ -484,7 +484,7 @@ impl RenderState {
|
|||
));
|
||||
|
||||
canvas.clear(self.background_color);
|
||||
canvas.draw_image(snapshot.clone(), (0, 0), Some(&skia::Paint::default()));
|
||||
canvas.draw_image(snapshot, (0, 0), Some(&skia::Paint::default()));
|
||||
canvas.restore();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue