Index: samplecode/SampleShaders.cpp |
diff --git a/samplecode/SampleShaders.cpp b/samplecode/SampleShaders.cpp |
index 2ea6f0a68fecbd71d5cffc115df6fab9a88aaa6e..608199da4419b81a2c8a9dc7f806407090d7b9c5 100644 |
--- a/samplecode/SampleShaders.cpp |
+++ b/samplecode/SampleShaders.cpp |
@@ -32,11 +32,10 @@ static sk_sp<SkShader> make_bitmapfade(const SkBitmap& bm) { |
auto shaderA = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); |
auto shaderB = SkShader::MakeBitmapShader(bm, |
- SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); |
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode); |
- SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(SkXfermode::kDstIn_Mode)); |
- |
- return SkShader::MakeComposeShader(std::move(shaderB), std::move(shaderA), mode); |
+ return SkShader::MakeComposeShader(std::move(shaderB), std::move(shaderA), |
+ SkXfermode::Make(SkXfermode::kDstIn_Mode)); |
} |
class ShaderView : public SampleView { |
@@ -62,9 +61,8 @@ public: |
colors[1] = SkColorSetARGB(0x80, 0, 0, 0); |
auto shaderB = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); |
- SkAutoTUnref<SkXfermode> mode(SkXfermode::Create(SkXfermode::kDstIn_Mode)); |
- |
- fShader = SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), mode); |
+ fShader = SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), |
+ SkXfermode::Make(SkXfermode::kDstIn_Mode)); |
} |
protected: |