switch xfermodes over to sk_sp
waiting on https://codereview.chromium.org/1835163002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832223002
Review URL: https://codereview.chromium.org/1832223002
diff --git a/gm/composeshader.cpp b/gm/composeshader.cpp
index 421641c..efcfe79 100644
--- a/gm/composeshader.cpp
+++ b/gm/composeshader.cpp
@@ -30,9 +30,8 @@
colors[1] = SkColorSetARGB(0x80, 0, 0, 0);
auto shaderB = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode);
- SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(mode));
-
- return SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB), xfer);
+ return SkShader::MakeComposeShader(std::move(shaderA), std::move(shaderB),
+ SkXfermode::Make(mode));
}
class ComposeShaderGM : public skiagm::GM {
@@ -176,7 +175,7 @@
}
void onDraw(SkCanvas* canvas) override {
- SkAutoTUnref<SkXfermode> xfer(SkXfermode::Create(SkXfermode::kDstOver_Mode));
+ auto xfer(SkXfermode::Make(SkXfermode::kDstOver_Mode));
sk_sp<SkShader> shaders[] = {
// gradient should appear over color bitmap