On-screen keyboard widget for Ebitengine
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package kibodo |
|
|
|
import ( |
|
"testing" |
|
) |
|
|
|
func BenchmarkKeyboard_Draw(b *testing.B) { |
|
ch := make(chan *Input, 10) |
|
|
|
k := NewKeyboard() |
|
k.SetRect(0, 0, 100, 100) |
|
k.Show(ch) |
|
|
|
// Warm caches |
|
k.drawBackground() |
|
|
|
b.ReportAllocs() |
|
b.ResetTimer() |
|
for i := 0; i < b.N; i++ { |
|
k.drawBackground() |
|
} |
|
}
|
|
|