mirror of
https://github.com/penpot/penpot.git
synced 2026-11-18 16:12:24 +00:00
61cd9fe88683a4068817f538a2ae54d80aca095e stored a reference to the last snapshot of the tile atlas, presumably to avoid the call to image_snapshot when not needed. But it turns out image_snapshot doesn't actually cost anything since it just returns a reference to the surface texture. Storing the reference actually causes a 4096x4096 texture copy because skia has copy-on-write behaviour. Skia sees the reference stored in Surfaces, so when the next render tries to draw on the surface it needs to allocate + copy over the tile atlas texture. By removing the reference skia can reuse the texture on the next render which avoids a 64MiB copy on the GPU. AI-assisted-by: claude-opus-5-5