Index: src/utils/SkNinePatch.cpp |
diff --git a/src/utils/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp |
index 5ee488e44b6a2cce5c0d48211749a1e81aaa6cd1..aeb65b1e2815d00a6bb992c30af9fd529cd5447a 100644 |
--- a/src/utils/SkNinePatch.cpp |
+++ b/src/utils/SkNinePatch.cpp |
@@ -236,14 +236,13 @@ void SkNinePatch::DrawMesh(SkCanvas* canvas, const SkRect& bounds, |
fillRow(verts, texs, bounds.fBottom, SkIntToScalar(bitmap.height()), |
bounds, xDivs, numXDivs, stretchX, bitmap.width()); |
- SkShader* shader = SkShader::CreateBitmapShader(bitmap, |
- SkShader::kClamp_TileMode, |
- SkShader::kClamp_TileMode); |
SkPaint p; |
if (paint) { |
p = *paint; |
} |
- p.setShader(shader)->unref(); |
+ p.setShader(SkShader::MakeBitmapShader(bitmap, |
+ SkShader::kClamp_TileMode, |
+ SkShader::kClamp_TileMode)); |
canvas->drawVertices(SkCanvas::kTriangles_VertexMode, vCount, |
mesh.fVerts, mesh.fTexs, mesh.fColors, nullptr, |
mesh.fIndices, indexCount, p); |