gioui.org@v0.6.1-0.20240506124620-7a9ce51988ce/gpu/clip_test.go (about)

     1  // SPDX-License-Identifier: Unlicense OR MIT
     2  
     3  package gpu
     4  
     5  import (
     6  	"testing"
     7  
     8  	"gioui.org/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  }