all: update layouts to use layout.Context

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-09-24 19:14:58 +02:00
parent ce9bcee62b
commit ec307008db
6 changed files with 116 additions and 119 deletions
+3 -2
View File
@@ -22,10 +22,11 @@ func BenchmarkUI(b *testing.B) {
ops := new(ui.Ops)
q := new(queue)
c := new(config)
cs := layout.RigidConstraints(image.Point{800, 600})
ctx := new(layout.Context)
ctx.Constraints = layout.RigidConstraints(image.Point{800, 600})
for i := 0; i < b.N; i++ {
ops.Reset()
u.Layout(c, q, ops, cs)
u.Layout(c, q, ops, ctx)
}
}