Index: src/core/SkComposeShader.cpp |
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp |
index d433ff2d435077ced0a3bdff7ec851c62082e54e..c49d8a48ae261e202d523835fe1753d650824a64 100644 |
--- a/src/core/SkComposeShader.cpp |
+++ b/src/core/SkComposeShader.cpp |
@@ -252,3 +252,17 @@ void SkComposeShader::toString(SkString* str) const { |
str->append(")"); |
} |
#endif |
+ |
+/////////////////////////////////////////////////////////////////////////////////////////////////// |
+ |
+SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode* xfer) { |
+ if (!dst || !src) { |
+ return nullptr; |
+ } |
+ return new SkComposeShader(dst, src, xfer); |
+} |
+ |
+SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode::Mode mode) { |
+ SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode)); |
+ return CreateComposeShader(dst, src, xfer); |
+} |