aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkColorMatrixFilter.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-01-11 12:34:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-11 12:34:04 -0800
commit0daf5dd7fc682c939325e16cac6f8aa2e1295060 (patch)
tree9ce9e7832ff5b651bde6a762d4553cd12de13373 /include/effects/SkColorMatrixFilter.h
parent639475e375b7e62277ac5e5b96eadeaaa1afcddc (diff)
move declaration of CreateLightingFilter into SkColorMatrixFilter
Diffstat (limited to 'include/effects/SkColorMatrixFilter.h')
-rw-r--r--include/effects/SkColorMatrixFilter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 851a6e9002..7ffbf117cb 100644
--- a/include/effects/SkColorMatrixFilter.h
+++ b/include/effects/SkColorMatrixFilter.h
@@ -20,6 +20,14 @@ public:
return new SkColorMatrixFilter(array);
}
+ /**
+ * Create a colorfilter that multiplies the RGB channels by one color, and
+ * then adds a second color, pinning the result for each component to
+ * [0..255]. The alpha components of the mul and add arguments
+ * are ignored.
+ */
+ static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add);
+
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
uint32_t getFlags() const override;
bool asColorMatrix(SkScalar matrix[20]) const override;