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

Unified Diff: samplecode/SampleAARects.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/SampleAARectModes.cpp ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAARects.cpp
diff --git a/samplecode/SampleAARects.cpp b/samplecode/SampleAARects.cpp
index f552df6f1586c4ac580ea6d2fe97926c185b3f80..d0c1115a1e012382df9b6f6e4b87c27ee70f1781 100644
--- a/samplecode/SampleAARects.cpp
+++ b/samplecode/SampleAARects.cpp
@@ -62,10 +62,8 @@ protected:
SkPaint bluePaint;
bluePaint.setARGB(0xff, 0x0, 0x0, 0xff);
SkPaint bmpPaint;
- SkShader* bmpShader = SkShader::CreateBitmapShader(fBitmap, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);
- bmpPaint.setShader(bmpShader);
- bmpShader->unref();
-
+ bmpPaint.setShader(SkShader::MakeBitmapShader(fBitmap, SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode));
bluePaint.setStrokeWidth(3);
bmpPaint.setStrokeWidth(3);
« no previous file with comments | « samplecode/SampleAARectModes.cpp ('k') | samplecode/SampleAll.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698