graphics: Add BenchmarkCopyImageNRGBA

This commit is contained in:
Hajime Hoshi 2016-12-27 01:57:36 +09:00
parent 006f87d02b
commit 5c9b9ef6cb

View File

@ -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()