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

Unified Diff: gm/drawfilter.cpp

Issue 1852113003: switch maskfilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/drawbitmaprect.cpp ('k') | gm/drawlooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/drawfilter.cpp
diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp
index d17eb4f52fcfc02220daaae537fb31dd4fd50a24..33e1d0085352125cd77a3af44d86949965a1ee93 100644
--- a/gm/drawfilter.cpp
+++ b/gm/drawfilter.cpp
@@ -33,7 +33,7 @@ public:
}
class DrawFilterGM : public skiagm::GM {
- SkAutoTUnref<SkMaskFilter> fBlur;
+ sk_sp<SkMaskFilter> fBlur;
protected:
SkISize onISize() override {
@@ -45,15 +45,15 @@ protected:
}
void onOnceBeforeDraw() override {
- fBlur.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
+ fBlur = SkBlurMaskFilter::Make(kNormal_SkBlurStyle,
SkBlurMask::ConvertRadiusToSigma(10.0f),
- kLow_SkBlurQuality));
+ kLow_SkBlurQuality);
}
void onDraw(SkCanvas* canvas) override {
SkPaint p;
p.setColor(SK_ColorBLUE);
- p.setMaskFilter(fBlur.get());
+ p.setMaskFilter(fBlur);
SkRect r = { 20, 20, 100, 100 };
canvas->setDrawFilter(nullptr);
canvas->drawRect(r, p);
« no previous file with comments | « gm/drawbitmaprect.cpp ('k') | gm/drawlooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698