2021-02-14 18:27:32 +00:00
|
|
|
import benchy, chroma, vmath
|
|
|
|
|
2021-02-14 04:13:58 +00:00
|
|
|
include pixie/images
|
|
|
|
|
|
|
|
block:
|
|
|
|
let
|
|
|
|
a = newImage(1000, 1000)
|
|
|
|
b = newImage(50, 50)
|
|
|
|
a.fill(rgba(255, 0, 0, 255))
|
|
|
|
b.fill(rgba(0, 255, 0, 255))
|
|
|
|
|
|
|
|
timeIt "drawCorrect small-on-big":
|
2021-10-03 22:49:21 +00:00
|
|
|
a.drawCorrect(b, translate(vec2(25, 25)), blendMode = bmNormal)
|
2021-02-14 04:13:58 +00:00
|
|
|
keep(b)
|
|
|
|
|
|
|
|
block:
|
|
|
|
let
|
|
|
|
a = newImage(1000, 1000)
|
|
|
|
b = newImage(50, 50)
|
|
|
|
a.fill(rgba(255, 0, 0, 255))
|
|
|
|
b.fill(rgba(0, 255, 0, 255))
|
|
|
|
|
|
|
|
timeIt "drawUber small-on-big":
|
2021-10-03 22:49:21 +00:00
|
|
|
a.drawUber(b, translate(vec2(25, 25)), blendMode = bmNormal)
|
2021-02-14 04:13:58 +00:00
|
|
|
keep(b)
|
|
|
|
|
|
|
|
block:
|
|
|
|
let
|
|
|
|
a = newImage(1000, 1000)
|
|
|
|
b = newImage(50, 50)
|
|
|
|
a.fill(rgba(255, 0, 0, 255))
|
|
|
|
b.fill(rgba(0, 255, 0, 255))
|
|
|
|
|
|
|
|
timeIt "drawCorrect small-on-big smooth":
|
2021-10-03 22:49:21 +00:00
|
|
|
a.drawCorrect(b, translate(vec2(25.1, 25.1)), blendMode = bmNormal)
|
2021-02-14 04:13:58 +00:00
|
|
|
keep(b)
|
|
|
|
|
|
|
|
block:
|
|
|
|
let
|
|
|
|
a = newImage(1000, 1000)
|
|
|
|
b = newImage(50, 50)
|
|
|
|
a.fill(rgba(255, 0, 0, 255))
|
|
|
|
b.fill(rgba(0, 255, 0, 255))
|
|
|
|
|
|
|
|
timeIt "drawUber small-on-big smooth":
|
2021-10-03 22:49:21 +00:00
|
|
|
a.drawUber(b, translate(vec2(25.1, 25.1)), blendMode = bmNormal)
|
2021-02-14 04:13:58 +00:00
|
|
|
keep(b)
|