Index: Source/core/platform/graphics/filters/FEBlend.cpp |
diff --git a/Source/core/platform/graphics/filters/FEBlend.cpp b/Source/core/platform/graphics/filters/FEBlend.cpp |
index 42e2bc6de0be944df374db6c0297094626741457..aa9f6f7124095a8bb6852946fdb85dad9e25e027 100644 |
--- a/Source/core/platform/graphics/filters/FEBlend.cpp |
+++ b/Source/core/platform/graphics/filters/FEBlend.cpp |
@@ -33,7 +33,8 @@ |
#include "core/platform/text/TextStream.h" |
#include "core/rendering/RenderTreeAsText.h" |
-#include <wtf/Uint8ClampedArray.h> |
+#include "wtf/MathExtras.h" |
+#include "wtf/Uint8ClampedArray.h" |
#include "SkBitmapSource.h" |
#include "SkBlendImageFilter.h" |
@@ -68,13 +69,7 @@ bool FEBlend::setBlendMode(BlendModeType mode) |
return true; |
} |
-static inline unsigned char fastDivideBy255(uint16_t value) |
-{ |
- // This is an approximate algorithm for division by 255, but it gives accurate results for 16bit values. |
- uint16_t quotient = value >> 8; |
- uint16_t remainder = value - (quotient * 255) + 1; |
- return quotient + (remainder >> 8); |
-} |
+using WTF::fastDivideBy255; |
inline unsigned char feBlendNormal(unsigned char colorA, unsigned char colorB, unsigned char alphaA, unsigned char) |
{ |