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

Unified Diff: tests/CanvasTest.cpp

Issue 1789633002: more shader-->sp conversions (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
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index f34430f475aea5bd1be0ccccc22f1e553760233c..8681ca4f180651823ed2be6f22bbdf73541c9293 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -415,9 +415,8 @@ static void DrawVerticesShaderTestStep(SkCanvas* canvas, const TestData& d,
pts[2].set(SkIntToScalar(d.fWidth), SkIntToScalar(d.fHeight));
pts[3].set(0, SkIntToScalar(d.fHeight));
SkPaint paint;
- SkShader* shader = SkShader::CreateBitmapShader(d.fBitmap,
- SkShader::kClamp_TileMode, SkShader::kClamp_TileMode);
- paint.setShader(shader)->unref();
+ paint.setShader(SkShader::MakeBitmapShader(d.fBitmap, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
canvas->drawVertices(SkCanvas::kTriangleFan_VertexMode, 4, pts, pts,
nullptr, nullptr, nullptr, 0, paint);
}

Powered by Google App Engine
This is Rietveld 408576698