Files
gio-patched/example/gophers/main_test.go
T
Elias Naur d8000880c3 example,cmd: bump gio version
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-05-23 23:14:46 +02:00

25 lines
375 B
Go

// SPDX-License-Identifier: Unlicense OR MIT
package main
import (
"image"
"testing"
"gioui.org/layout"
"gioui.org/op"
)
func BenchmarkUI(b *testing.B) {
fetch := func(_ string) {}
u := newUI(fetch)
var ops op.Ops
for i := 0; i < b.N; i++ {
gtx := layout.Context{
Ops: &ops,
Constraints: layout.Exact(image.Pt(800, 600)),
}
u.Layout(gtx)
}
}