graphics: Add BenchmarkDrawImage

This commit is contained in:
Hajime Hoshi 2017-05-27 22:28:14 +09:00
parent a816c9c7fe
commit 3b25289a18

View File

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