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

Unified Diff: gm/textblobshader.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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/textbloblooper.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698