pixie/tests/benchmark_masks.nim

38 lines
415 B
Nim
Raw Normal View History

2021-02-14 18:27:32 +00:00
import benchy, chroma, pixie
2021-02-08 22:34:05 +00:00
let mask = newMask(2560, 1440)
proc reset() =
mask.fill(63)
reset()
timeIt "minifyBy2":
let minified = mask.minifyBy2()
doAssert minified[0, 0] == 63
reset()
2021-02-09 04:26:51 +00:00
timeIt "invert":
mask.invert()
reset()
timeIt "applyOpacity":
mask.applyOpacity(0.5)
2021-02-10 03:13:23 +00:00
reset()
timeIt "blur":
mask.blur(40)
2021-02-11 08:38:27 +00:00
reset()
2021-02-11 19:13:09 +00:00
timeIt "ceil":
mask.ceil()
2021-02-11 21:05:34 +00:00
reset()
timeIt "spread":
mask.spread(10)