pixie/tests/benchmark_images_draw.nim

33 lines
736 B
Nim
Raw Normal View History

2020-12-04 06:11:54 +00:00
import pixie, chroma, vmath, benchy
2020-11-22 00:51:29 +00:00
2020-12-04 06:11:54 +00:00
block:
2020-11-22 00:51:29 +00:00
var c: Image
2020-12-04 06:11:54 +00:00
var a = newImage(1000, 1000)
a.fill(rgba(255, 0, 0, 255))
var b = newImage(1000, 1000)
b.fill(rgba(0, 255, 0, 255))
timeIt "drawCorrect bmNormal":
a.drawCorrect(b, translate(vec2(25, 25)), bmNormal)
keep(b)
block:
var a = newImage(1000, 1000)
a.fill(rgba(255, 0, 0, 255))
var b = newImage(1000, 1000)
b.fill(rgba(0, 255, 0, 255))
timeIt "draw bmNormal":
2020-11-28 00:51:37 +00:00
a.draw(b, translate(vec2(25, 25)), bmNormal)
2020-12-04 06:11:54 +00:00
keep(b)
2020-11-26 06:32:50 +00:00
2020-12-04 06:11:54 +00:00
block:
var a = newImage(1000, 1000)
a.fill(rgba(255, 0, 0, 255))
var b = newImage(1000, 1000)
b.fill(rgba(0, 255, 0, 255))
2020-11-26 06:32:50 +00:00
2020-12-04 06:11:54 +00:00
timeIt "draw Smooth bmNormal":
2020-11-28 00:51:37 +00:00
a.draw(b, translate(vec2(25.2, 25.2)), bmNormal)
2020-12-04 06:11:54 +00:00
keep(b)