Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: include/effects/SkColorMatrixFilter.h

Issue 1574023002: move declaration of CreateLightingFilter into SkColorMatrixFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: don't remove old impl yet Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkColorFilter.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkColorMatrixFilter.h
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h
index 851a6e900298dc7618aba2ebe5a582c0d81f5b53..7ffbf117cb21e528c0a966e02c9813498c7af3dc 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;
« no previous file with comments | « include/core/SkColorFilter.h ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698