draw optimizations
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user