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

Unified Diff: gm/textblobshader.cpp

Issue 1789633002: more shader-->sp conversions (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
Index: gm/textblobshader.cpp
diff --git a/gm/textblobshader.cpp b/gm/textblobshader.cpp
index 30674e1d6877521c3595ffa94fc3775bdc7ff9d3..6a8fa49289996268f4b1af669bdf99ec0ee3736d 100644
--- a/gm/textblobshader.cpp
+++ b/gm/textblobshader.cpp
@@ -68,11 +68,11 @@ protected:
}
SkISize sz = this->onISize();
- fShader.reset(SkGradientShader::CreateRadial(SkPoint::Make(SkIntToScalar(sz.width() / 2),
- SkIntToScalar(sz.height() / 2)),
- sz.width() * .66f, colors, pos,
- SK_ARRAY_COUNT(colors),
- SkShader::kRepeat_TileMode));
+ fShader = SkGradientShader::MakeRadial(SkPoint::Make(SkIntToScalar(sz.width() / 2),
+ SkIntToScalar(sz.height() / 2)),
+ sz.width() * .66f, colors, pos,
+ SK_ARRAY_COUNT(colors),
+ SkShader::kRepeat_TileMode);
}
SkString onShortName() override {
@@ -104,7 +104,7 @@ protected:
private:
SkTDArray<uint16_t> fGlyphs;
SkAutoTUnref<const SkTextBlob> fBlob;
- SkAutoTUnref<SkShader> fShader;
+ sk_sp<SkShader> fShader;
typedef skiagm::GM INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698