Browse Source

Removed obsolete filter_mulColorRgb and filter_mulColorRgba functions.

David Piuva 5 years ago
parent
commit
b4a420344e
2 changed files with 0 additions and 35 deletions
  1. 0 32
      Source/DFPSR/api/drawAPI.cpp
  2. 0 3
      Source/DFPSR/api/drawAPI.h

+ 0 - 32
Source/DFPSR/api/drawAPI.cpp

@@ -91,38 +91,6 @@ ImageF32 dsr::filter_generateF32(int width, int height, const ImageGenF32& lambd
 	return result;
 }
 
-// Basic immutable image operations
-// TODO: Create optimized in-place versions for aligned images based on the reference implementations
-static const uint32_t imageMultiply_shift = 10;
-static const float imageMultiply_scale = (1u << imageMultiply_shift) / 255.0f;
-ImageRgbaU8 dsr::filter_mulColorRgb(const ImageRgbaU8& inputImage, const ColorRgbI32& color) {
-	if (inputImage) {
-		const int iR = (float)color.red * imageMultiply_scale;
-		const int iG = (float)color.green * imageMultiply_scale;
-		const int iB = (float)color.blue * imageMultiply_scale;
-		return filter_generateRgbaU8(inputImage->width, inputImage->height, [inputImage, iR, iG, iB](int x, int y)->ColorRgbaI32 {
-			ColorRgbaI32 source = image_readPixel_clamp(inputImage, x, y);
-			return ColorRgbaI32((source.red * iR) >> imageMultiply_shift, (source.green * iG) >> imageMultiply_shift, (source.blue * iB) >> imageMultiply_shift, source.alpha);
-		});
-	} else {
-		return ImageRgbaU8();
-	}
-}
-ImageRgbaU8 dsr::filter_mulColorRgba(const ImageRgbaU8& inputImage, const ColorRgbaI32& color) {
-	if (inputImage) {
-		const int iR = (float)color.red * imageMultiply_scale;
-		const int iG = (float)color.green * imageMultiply_scale;
-		const int iB = (float)color.blue * imageMultiply_scale;
-		const int iA = (float)color.alpha * imageMultiply_scale;
-		return filter_generateRgbaU8(inputImage->width, inputImage->height, [inputImage, iR, iG, iB, iA](int x, int y)->ColorRgbaI32 {
-			ColorRgbaI32 source = image_readPixel_clamp(inputImage, x, y);
-			return ColorRgbaI32((source.red * iR) >> imageMultiply_shift, (source.green * iG) >> imageMultiply_shift, (source.blue * iB) >> imageMultiply_shift, (source.alpha * iA) >> imageMultiply_shift);
-		});
-	} else {
-		return ImageRgbaU8();
-	}
-}
-
 
 // -------------------------------- Drawing shapes --------------------------------
 

+ 0 - 3
Source/DFPSR/api/drawAPI.h

@@ -163,9 +163,6 @@ namespace dsr {
 	ImageRgbaU8 filter_generateRgbaU8(int width, int height, const ImageGenRgbaU8& lambda, int startX = 0, int startY = 0);
 	ImageF32 filter_generateF32(int width, int height, const ImageGenF32& lambda, int startX = 0, int startY = 0);
 
-	// TODO: Document
-	ImageRgbaU8 filter_mulColorRgb(const ImageRgbaU8& inputImage, const ColorRgbI32& color);
-	ImageRgbaU8 filter_mulColorRgba(const ImageRgbaU8& inputImage, const ColorRgbaI32& color);
 }
 
 #endif