MCPcopy Create free account
hub / github.com/cogentcore/core / BenchmarkFill

Function BenchmarkFill

paint/raster/raster_test.go:124–138  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

122}
123
124func BenchmarkFill(b *testing.B) {
125 var (
126 p = GetTestPath()
127 wx, wy = 512, 512
128 img = image.NewRGBA(image.Rect(0, 0, wx, wy))
129 scanner = scan.NewScanner(scan.NewImgSpanner(img), wx, wy)
130 )
131 f := NewFiller(wx, wy, scanner)
132 b.ResetTimer()
133 for i := 0; i < b.N; i++ {
134 p.AddTo(f)
135 f.Draw()
136 f.Clear()
137 }
138}
139
140func BenchmarkDash(b *testing.B) {
141 var (

Callers

nothing calls this directly

Calls 7

ClearMethod · 0.95
NewScannerFunction · 0.92
NewImgSpannerFunction · 0.92
GetTestPathFunction · 0.85
NewFillerFunction · 0.85
AddToMethod · 0.80
DrawMethod · 0.65

Tested by

no test coverage detected