Index: bench/PatchBench.cpp |
diff --git a/bench/PatchBench.cpp b/bench/PatchBench.cpp |
index 6f51b4593ab192eacb061e1653a628835f00370c..5d7451a0c449331033132a4cca2a771f7b45bea9 100644 |
--- a/bench/PatchBench.cpp |
+++ b/bench/PatchBench.cpp |
@@ -69,16 +69,15 @@ public: |
} |
// override this method to change the shader |
- virtual SkShader* createShader() { |
+ virtual sk_sp<SkShader> createShader() { |
const SkColor colors[] = { |
SK_ColorRED, SK_ColorCYAN, SK_ColorGREEN, SK_ColorWHITE, |
SK_ColorMAGENTA, SK_ColorBLUE, SK_ColorYELLOW, |
}; |
const SkPoint pts[] = { { 200.f / 4.f, 0.f }, { 3.f * 200.f / 4, 200.f } }; |
- return SkGradientShader::CreateLinear(pts, colors, nullptr, |
- SK_ARRAY_COUNT(colors), |
- SkShader::kMirror_TileMode); |
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), |
+ SkShader::kMirror_TileMode); |
} |
protected: |
@@ -115,7 +114,7 @@ protected: |
switch (fVertexMode) { |
case kTexCoords_VertexMode: |
case kBoth_VertexMode: |
- fPaint.setShader(this->createShader())->unref(); |
+ fPaint.setShader(this->createShader()); |
break; |
default: |
fPaint.setShader(nullptr); |