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

Unified Diff: tests/CanvasTest.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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 | « tests/BlitRowTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « tests/BlitRowTest.cpp ('k') | tests/DrawBitmapRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698