From aa4d126a428aa4d17a481b17ecf4afee5d351fe0 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sat, 30 Jul 2022 01:43:56 -0500 Subject: [PATCH] add --- tests/bench_images_draw.nim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/bench_images_draw.nim b/tests/bench_images_draw.nim index bc09b0e..ffd03c7 100644 --- a/tests/bench_images_draw.nim +++ b/tests/bench_images_draw.nim @@ -10,6 +10,26 @@ block: timeIt "big-on-bigger NormalBlend": a.draw(b, translate(vec2(25, 25)), NormalBlend) +block: + let + a = newImage(1000, 1000) + b = newImage(500, 500) + a.fill(rgba(255, 0, 0, 255)) + b.fill(rgba(0, 255, 0, 255)) + + timeIt "big-on-bigger MaskBlend": + a.draw(b, translate(vec2(25, 25)), MaskBlend) + +block: + let + a = newImage(1000, 1000) + b = newImage(500, 500) + a.fill(rgba(255, 0, 0, 255)) + b.fill(rgba(0, 255, 0, 255)) + + timeIt "big-on-bigger OverwriteBlend": + a.draw(b, translate(vec2(25, 25)), OverwriteBlend) + block: let a = newImage(1000, 1000)