mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add BenchmarkCopyImageNRGBA
This commit is contained in:
parent
006f87d02b
commit
5c9b9ef6cb
@ -83,6 +83,14 @@ func BenchmarkCopyImageRGBA(b *testing.B) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkCopyImageNRGBA(b *testing.B) {
|
||||||
|
img := image.NewNRGBA(image.Rect(0, 0, 4096, 4096))
|
||||||
|
b.ResetTimer()
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
CopyImage(img)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func BenchmarkCopyImagePaletted(b *testing.B) {
|
func BenchmarkCopyImagePaletted(b *testing.B) {
|
||||||
img := image.NewPaletted(image.Rect(0, 0, 4096, 4096), palette.Plan9)
|
img := image.NewPaletted(image.Rect(0, 0, 4096, 4096), palette.Plan9)
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
|
Loading…
Reference in New Issue
Block a user