From 36352685e1bdab034851a246d0d8c7960e0d2144 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Fri, 26 Feb 2021 18:42:40 -0600 Subject: [PATCH] bugfix blur perf rgba/rgbx --- docs/pixie.html | 4 ++-- docs/pixie/blends.html | 2 +- docs/pixie/common.html | 2 +- docs/pixie/fileformats/bmp.html | 2 +- docs/pixie/fileformats/jpg.html | 2 +- docs/pixie/fileformats/png.html | 2 +- docs/pixie/fileformats/svg.html | 2 +- docs/pixie/images.html | 10 +++++----- docs/pixie/images.idx | 2 +- docs/pixie/internal.html | 14 +++++++++++++- docs/pixie/internal.idx | 1 + docs/pixie/masks.html | 17 +++++++++++++++-- docs/pixie/masks.idx | 1 + docs/pixie/paints.html | 2 +- docs/pixie/paths.html | 2 +- docs/theindex.html | 10 ++++++++-- pixie.nimble | 2 +- src/pixie/blends.nim | 2 +- src/pixie/images.nim | 16 ++++++++-------- tests/benchmark_images.nim | 6 +++--- tests/images/imageblur20.png | Bin 0 -> 6088 bytes tests/images/maskblur20.png | Bin 0 -> 2372 bytes tests/test_images.nim | 7 +++++++ tests/test_masks.nim | 6 ++++++ 24 files changed, 80 insertions(+), 34 deletions(-) create mode 100644 tests/images/imageblur20.png create mode 100644 tests/images/maskblur20.png diff --git a/docs/pixie.html b/docs/pixie.html index d93d23e..cab9ece 100644 --- a/docs/pixie.html +++ b/docs/pixie.html @@ -528,7 +528,7 @@ Strokes a polygon.

Exports

-maskerSimd, Masker, blender, hasSimdBlender, Blender, BlenderSimd, MaskerSimd, blenderSimd, hasSimdMasker, masker, BlendMode, blendAlpha, PixieError, lerp, lerp, fractional, lerp, getRgbaUnsafe, draw, []=, Image, copy, wh, setRgbaUnsafe, getRgbaSmooth, invert, flipVertical, magnifyBy2, draw, draw, flipHorizontal, shadow, subImage, inside, $, draw, shift, dataIndex, minifyBy2, draw, draw, fill, draw, newMask, blur, newImage, drawTiled, applyOpacity, resize, superImage, fillUnsafe, draw, [], $, setValueUnsafe, ceil, dataIndex, []=, spread, copy, wh, newMask, minifyBy2, fill, Mask, getValueUnsafe, getValueSmooth, fillUnsafe, inside, [], ColorStop, PaintKind, fillLinearGradient, fillRadialGradient, fillAngularGradient, Paint, bezierCurveTo, LineCap, arcTo, LineJoin, rect, bezierCurveTo, SomePath, strokePath, $, parsePath, fillPath, lineTo, polygon, roundedRect, quadraticCurveTo, fillPath, strokePath, ellipticalArcTo, Path, lineTo, ellipse, quadraticCurveTo, arcTo, moveTo, roundedRect, PathCommandKind, polygon, strokePath, transform, PathCommand, roundedRect, rect, fillPath, segments, closePath, addPath, rect, strokePath, commandsToShapes, ellipse, WindingRule, fillPath, moveTo, fillPath +maskerSimd, Masker, blender, hasSimdBlender, Blender, BlenderSimd, MaskerSimd, blenderSimd, hasSimdMasker, masker, BlendMode, blendAlpha, PixieError, lerp, lerp, fractional, lerp, getRgbaUnsafe, draw, []=, Image, copy, wh, setRgbaUnsafe, getRgbaSmooth, invert, flipVertical, magnifyBy2, draw, draw, flipHorizontal, shadow, subImage, inside, $, draw, shift, dataIndex, minifyBy2, draw, draw, fill, draw, newMask, blur, newImage, drawTiled, applyOpacity, resize, superImage, fillUnsafe, draw, [], $, setValueUnsafe, ceil, dataIndex, []=, spread, copy, wh, newMask, minifyBy2, fill, Mask, getValueUnsafe, getValueSmooth, blur, fillUnsafe, inside, [], ColorStop, PaintKind, fillLinearGradient, fillRadialGradient, fillAngularGradient, Paint, bezierCurveTo, LineCap, arcTo, LineJoin, rect, bezierCurveTo, SomePath, strokePath, $, parsePath, fillPath, lineTo, polygon, roundedRect, quadraticCurveTo, fillPath, strokePath, ellipticalArcTo, Path, lineTo, ellipse, quadraticCurveTo, arcTo, moveTo, roundedRect, PathCommandKind, polygon, strokePath, transform, PathCommand, roundedRect, rect, fillPath, segments, closePath, addPath, rect, strokePath, commandsToShapes, ellipse, WindingRule, fillPath, moveTo, fillPath
@@ -538,7 +538,7 @@ Strokes a polygon. diff --git a/docs/pixie/blends.html b/docs/pixie/blends.html index 6b26424..a3f5abc 100644 --- a/docs/pixie/blends.html +++ b/docs/pixie/blends.html @@ -283,7 +283,7 @@ Is there a blend masking function with SIMD support? diff --git a/docs/pixie/common.html b/docs/pixie/common.html index ee15117..24522ff 100644 --- a/docs/pixie/common.html +++ b/docs/pixie/common.html @@ -196,7 +196,7 @@ Linearly interpolate between a and b using t. diff --git a/docs/pixie/fileformats/bmp.html b/docs/pixie/fileformats/bmp.html index 988b096..3ba126d 100644 --- a/docs/pixie/fileformats/bmp.html +++ b/docs/pixie/fileformats/bmp.html @@ -182,7 +182,7 @@ Encodes an image into the BMP file format. diff --git a/docs/pixie/fileformats/jpg.html b/docs/pixie/fileformats/jpg.html index a9090e8..de97893 100644 --- a/docs/pixie/fileformats/jpg.html +++ b/docs/pixie/fileformats/jpg.html @@ -182,7 +182,7 @@ Encodes Image into a JPEG data string. diff --git a/docs/pixie/fileformats/png.html b/docs/pixie/fileformats/png.html index 9b3099c..1ae53fd 100644 --- a/docs/pixie/fileformats/png.html +++ b/docs/pixie/fileformats/png.html @@ -201,7 +201,7 @@ Encodes the mask data into the PNG file format. diff --git a/docs/pixie/fileformats/svg.html b/docs/pixie/fileformats/svg.html index 72a3b76..bc25c55 100644 --- a/docs/pixie/fileformats/svg.html +++ b/docs/pixie/fileformats/svg.html @@ -171,7 +171,7 @@ Render SVG file and return the image. Defaults to the SVG's view box size. diff --git a/docs/pixie/images.html b/docs/pixie/images.html index 74fbf5d..c9e47b6 100644 --- a/docs/pixie/images.html +++ b/docs/pixie/images.html @@ -230,8 +230,8 @@ function main() { + +
blur:
bmColor:
+
gaussianLookup:
getRgbaSmooth: