Index: src/effects/SkColorFilters.cpp |
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp |
index 4515c0d3fefa52b398f4d312e30008184cb6b7f9..fe39dd980025c3ed4c7e39a5beb42d52b2e04646 100644 |
--- a/src/effects/SkColorFilters.cpp |
+++ b/src/effects/SkColorFilters.cpp |
@@ -14,7 +14,6 @@ |
#include "SkUtils.h" |
#include "SkString.h" |
#include "SkValidationUtils.h" |
-#include "SkColorMatrixFilter.h" |
bool SkModeColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const { |
if (color) { |
@@ -169,28 +168,3 @@ SkColorFilter* SkColorFilter::CreateModeFilter(SkColor color, SkXfermode::Mode m |
return SkModeColorFilter::Create(color, mode); |
} |
} |
- |
-/////////////////////////////////////////////////////////////////////////////// |
- |
-static SkScalar byte_to_scale(U8CPU byte) { |
- if (0xFF == byte) { |
- // want to get this exact |
- return 1; |
- } else { |
- return byte * 0.00392156862745f; |
- } |
-} |
- |
-SkColorFilter* SkColorFilter::CreateLightingFilter(SkColor mul, SkColor add) { |
- SkColorMatrix matrix; |
- matrix.setScale(byte_to_scale(SkColorGetR(mul)), |
- byte_to_scale(SkColorGetG(mul)), |
- byte_to_scale(SkColorGetB(mul)), |
- 1); |
- matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), |
- SkIntToScalar(SkColorGetG(add)), |
- SkIntToScalar(SkColorGetB(add)), |
- 0); |
- return SkColorMatrixFilter::Create(matrix); |
-} |
- |