mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
The playground called _init and _set_render_options with the DPR, which sets the ratio but leaves the Skia target, backbuffer and UI surfaces at CSS resolution. The canvas drawing buffer is physical (CSS x DPR), so at DPR > 1 the smaller surface anchored to the bottom-left of the framebuffer and left the top and right edges unpainted. Call _resize_viewbox after setting the DPR, the same sequence the application uses in resize-canvas!, so the renderer surfaces match the physical drawing buffer. Cover DPR 1, 1.25 and 2 in the adapter test. AI-assisted-by: deepseek-flash