add SkShader::newWithColorFilter
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556693003
Review URL: https://codereview.chromium.org/1562193002
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 4d3ac5c..60ef280 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -15,6 +15,7 @@
#include "SkPaint.h"
#include "../gpu/GrColor.h"
+class SkColorFilter;
class SkPath;
class SkPicture;
class SkXfermode;
@@ -309,6 +310,12 @@
* The specified matrix will be applied before any matrix associated with this shader.
*/
SkShader* newWithLocalMatrix(const SkMatrix&) const;
+
+ /**
+ * Create a new shader that produces the same colors as invoking this shader and then applying
+ * the colorfilter.
+ */
+ SkShader* newWithColorFilter(SkColorFilter*) const;
//////////////////////////////////////////////////////////////////////////
// Factory methods for stock shaders