Index: bench/PatchGridBench.cpp |
diff --git a/bench/PatchGridBench.cpp b/bench/PatchGridBench.cpp |
index ef785320dff1853bfc864ca544266afc5f3ab97b..83e2932edc9378fc0faee578be75e0c66aa82214 100644 |
--- a/bench/PatchGridBench.cpp |
+++ b/bench/PatchGridBench.cpp |
@@ -150,16 +150,15 @@ public: |
} |
// override this method to change the shader |
- SkShader* createShader() { |
+ 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: |
@@ -205,7 +204,7 @@ protected: |
switch (fVertexMode) { |
case kTexCoords_VertexMode: |
case kBoth_VertexMode: |
- fPaint.setShader(createShader())->unref(); |
+ fPaint.setShader(createShader()); |
break; |
default: |
fPaint.setShader(nullptr); |