mirror of
https://github.com/penpot/penpot.git
synced 2026-11-16 23:20:37 +00:00
When dragging a shape each tile that needs repainted is repainted via draw_current_tile_into_backbuffer in fast mode. So if you drag over a tile it ends up dropping drop shadows etc. IIUC, each tile is 512x512px but drawn on a 1024px surface with 256px margins so that the background blur has something to read. In a regular render we render the 1024px surface but only copy the center 512px of the tile into the backbuffer. But in draw_current_tile_into_backbuffer we were copying the whole 1024px surface. This draws over the other tiles with a fast mode render, even though those other tiles don't need repainted. This fixes it by reusing draw_surface_src_rect_to_dst which clips the canvas properly so we only draw the 512x512px of the tile. AI-assisted-by: claude-fable-5-2