Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: src/utils/SkMeshUtils.cpp

Issue 1772463002: use Make instead of Create to return a shared shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/utils/SkNinePatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkMeshUtils.cpp
diff --git a/src/utils/SkMeshUtils.cpp b/src/utils/SkMeshUtils.cpp
index cf4e5099b37b010427bb420d0f0a454473544f63..5d3eefc54fb3fcb1fcfe803d3f8f35a3cfd3e9d6 100644
--- a/src/utils/SkMeshUtils.cpp
+++ b/src/utils/SkMeshUtils.cpp
@@ -92,9 +92,9 @@ void SkMeshUtils::Draw(SkCanvas* canvas, const SkBitmap& bitmap,
if (idx.init(bitmap.width(), bitmap.height(), rows, cols)) {
SkPaint p(paint);
- p.setShader(SkShader::CreateBitmapShader(bitmap,
+ p.setShader(SkShader::MakeBitmapShader(bitmap,
SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode))->unref();
+ SkShader::kClamp_TileMode));
canvas->drawVertices(SkCanvas::kTriangles_VertexMode,
rows * cols, verts, idx.tex(), colors, nullptr,
idx.indices(), idx.indexCount(), p);
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp ('k') | src/utils/SkNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698