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

Unified Diff: gm/badpaint.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 | « gm/arithmode.cpp ('k') | gm/bitmapshader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/badpaint.cpp
diff --git a/gm/badpaint.cpp b/gm/badpaint.cpp
index 7c51c749eed50af620bccb5f051449e89da00dff..85eaa1ed109f27fabe49d69c481213846baecd21 100644
--- a/gm/badpaint.cpp
+++ b/gm/badpaint.cpp
@@ -32,14 +32,13 @@ protected:
// Empty bitmap.
fPaints.push_back().setColor(SK_ColorGREEN);
- fPaints.back().setShader(SkShader::CreateBitmapShader(emptyBmp, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode))->unref();
+ fPaints.back().setShader(SkShader::MakeBitmapShader(emptyBmp, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
// Non-invertible local matrix.
fPaints.push_back().setColor(SK_ColorGREEN);
- fPaints.back().setShader(SkShader::CreateBitmapShader(blueBmp, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode,
- &badMatrix))->unref();
+ fPaints.back().setShader(SkShader::MakeBitmapShader(blueBmp, SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode, &badMatrix));
}
void onDraw(SkCanvas* canvas) override {
« no previous file with comments | « gm/arithmode.cpp ('k') | gm/bitmapshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698