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

Unified Diff: gm/samplerstress.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/rects.cpp ('k') | gm/skbug1719.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/samplerstress.cpp
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index 10e3cacd037b9ca8697b7d58dadb85dd1a1ada23..ee87f091f9b86e8145c0798299410449853f2db7 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -76,12 +76,12 @@ protected:
}
void createMaskFilter() {
- if (fMaskFilter.get()) {
+ if (fMaskFilter) {
return;
}
const SkScalar sigma = 1;
- fMaskFilter.reset(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, sigma));
+ fMaskFilter = SkBlurMaskFilter::Make(kNormal_SkBlurStyle, sigma);
}
void onDraw(SkCanvas* canvas) override {
@@ -96,7 +96,7 @@ protected:
paint.setAntiAlias(true);
paint.setTextSize(72);
paint.setShader(fShader);
- paint.setMaskFilter(fMaskFilter.get());
+ paint.setMaskFilter(fMaskFilter);
sk_tool_utils::set_portable_typeface(&paint);
SkRect temp;
@@ -138,7 +138,7 @@ private:
SkBitmap fTexture;
bool fTextureCreated;
sk_sp<SkShader> fShader;
- SkAutoTUnref<SkMaskFilter> fMaskFilter;
+ sk_sp<SkMaskFilter> fMaskFilter;
typedef GM INHERITED;
};
« no previous file with comments | « gm/rects.cpp ('k') | gm/skbug1719.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698