Implementing BitmapData.threshold() natively for massive speedup - 95% reduction in time taken

This commit is contained in:
Lars A. Doucet
2015-12-28 17:35:54 -06:00
committed by Joshua Granick
parent 91dd2b13cc
commit 3644008132
5 changed files with 380 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ namespace lime {
static void Resize (Image* image, ImageBuffer* buffer, int width, int height);
static void SetFormat (Image* image, PixelFormat format);
static void SetPixels (Image* image, Rectangle* rect, Bytes* bytes, PixelFormat format);
static int ThresholdInnerLoop (Image* image, Image* sourceImage, Rectangle* sourceRect, int mask, int threshold, int operation, int color, Rectangle* destRect);
static int Ucompare (int n1, int n2);
static void UnmultiplyAlpha (Image* image);