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

Unified Diff: samplecode/SampleRepeatTile.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 | « samplecode/SampleRegion.cpp ('k') | samplecode/SampleShaderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleRepeatTile.cpp
diff --git a/samplecode/SampleRepeatTile.cpp b/samplecode/SampleRepeatTile.cpp
index 9287439613cbadeebdb3fa83f36f9c93acd1f41a..598a088373c53cfa5a0fe40ca7c6d6cc6b861847 100644
--- a/samplecode/SampleRepeatTile.cpp
+++ b/samplecode/SampleRepeatTile.cpp
@@ -37,8 +37,7 @@ static void make_paint(SkPaint* paint, SkShader::TileMode tm) {
SkBitmap bm;
make_bitmap(&bm);
- SkShader* shader = SkShader::CreateBitmapShader(bm, tm, tm);
- paint->setShader(shader)->unref();
+ paint->setShader(SkShader::MakeBitmapShader(bm, tm, tm));
}
class RepeatTileView : public SampleView {
« no previous file with comments | « samplecode/SampleRegion.cpp ('k') | samplecode/SampleShaderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698