draw optimizations

This commit is contained in:
IliaDenisov
2026-03-08 23:30:11 +02:00
parent fdcbb5d6f4
commit ac35360d60
18 changed files with 875 additions and 566 deletions
@@ -99,16 +99,10 @@ func TestRender_PanTooLarge_FallsBackToFullRedraw(t *testing.T) {
// Full redraw should NOT call CopyShift.
require.Empty(t, d.CommandsByName("CopyShift"))
// Should contain at least one reasonably wide clip.
clipCmds := d.CommandsByName("ClipRect")
require.NotEmpty(t, clipCmds)
// Full redraw should clear the entire canvas.
require.NotEmpty(t, d.CommandsByName("ClearAllTo"))
foundWide := false
for _, c := range clipCmds {
if int(c.Args[2]) > 1 {
foundWide = true
break
}
}
require.True(t, foundWide)
// And should draw something (at least the point).
// Depending on your implementation, it might be AddPoint or AddCircle/AddLine as well.
require.NotEmpty(t, d.CommandsByName("AddPoint"))
}