mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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