mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Add BenchmarkDrawImage
This commit is contained in:
parent
a816c9c7fe
commit
3b25289a18
@ -576,3 +576,12 @@ func TestImageEdge(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkDrawImage(b *testing.B) {
|
||||
img0, _ := NewImage(16, 16, FilterNearest)
|
||||
img1, _ := NewImage(16, 16, FilterNearest)
|
||||
op := &DrawImageOptions{}
|
||||
for i := 0; i < b.N; i++ {
|
||||
img0.DrawImage(img1, op)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user