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

Unified Diff: samplecode/SampleFatBits.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/SampleEffects.cpp ('k') | samplecode/SampleGradients.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFatBits.cpp
diff --git a/samplecode/SampleFatBits.cpp b/samplecode/SampleFatBits.cpp
index f3a2f6c54a50f46c280f42883956c4b9b223126d..4b15e370e496ed092e43f01cedcadc76fed3c8ad 100644
--- a/samplecode/SampleFatBits.cpp
+++ b/samplecode/SampleFatBits.cpp
@@ -88,8 +88,7 @@ public:
fBounds.set(0, 0, SkIntToScalar(width * zoom), SkIntToScalar(height * zoom));
fMatrix.setScale(SkIntToScalar(zoom), SkIntToScalar(zoom));
fInverse.setScale(SK_Scalar1 / zoom, SK_Scalar1 / zoom);
- fShader.reset(sk_tool_utils::create_checkerboard_shader(
- 0xFFCCCCCC, 0xFFFFFFFF, zoom));
+ fShader = sk_tool_utils::create_checkerboard_shader(0xFFCCCCCC, 0xFFFFFFFF, zoom);
SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
fMinSurface.reset(SkSurface::NewRaster(info));
@@ -111,7 +110,7 @@ private:
int fW, fH, fZoom;
SkMatrix fMatrix, fInverse;
SkRect fBounds, fClipRect;
- SkAutoTUnref<SkShader> fShader;
+ sk_sp<SkShader> fShader;
SkAutoTUnref<SkSurface> fMinSurface;
SkAutoTUnref<SkSurface> fMaxSurface;
« no previous file with comments | « samplecode/SampleEffects.cpp ('k') | samplecode/SampleGradients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698