github.com/Seikaijyu/gio@v0.0.1/gpu/clip_test.go (about) 1 // SPDX-License-Identifier: Unlicense OR MIT 2 3 package gpu 4 5 import ( 6 "testing" 7 8 "github.com/Seikaijyu/gio/internal/f32" 9 ) 10 11 func BenchmarkEncodeQuadTo(b *testing.B) { 12 var data [vertStride * 4]byte 13 for i := 0; i < b.N; i++ { 14 v := float32(i) 15 encodeQuadTo(data[:], 123, 16 f32.Point{X: v, Y: v}, 17 f32.Point{X: v, Y: v}, 18 f32.Point{X: v, Y: v}, 19 ) 20 } 21 }