mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
d8000880c3
Signed-off-by: Elias Naur <mail@eliasnaur.com>
25 lines
375 B
Go
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)
|
|
}
|
|
}
|