diff options
author | 2016-01-11 12:34:04 -0800 | |
---|---|---|
committer | 2016-01-11 12:34:04 -0800 | |
commit | 0daf5dd7fc682c939325e16cac6f8aa2e1295060 (patch) | |
tree | 9ce9e7832ff5b651bde6a762d4553cd12de13373 /include/effects/SkColorMatrixFilter.h | |
parent | 639475e375b7e62277ac5e5b96eadeaaa1afcddc (diff) |
move declaration of CreateLightingFilter into SkColorMatrixFilter
BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574023002
Review URL: https://codereview.chromium.org/1574023002
Diffstat (limited to 'include/effects/SkColorMatrixFilter.h')
-rw-r--r-- | include/effects/SkColorMatrixFilter.h | 8 |
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; |