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

Unified Diff: samplecode/SampleLayers.cpp

Issue 1860573002: Update SkMorphology ImageFilters to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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 | « samplecode/SampleFilterFuzz.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLayers.cpp
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 8c2724ce95e4464bd8b17f19e28d82ca180abff5..194f0a70a92505882f01beab8633c8cf0a5c9cf7 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -245,13 +245,13 @@ class BackdropView : public SampleView {
SkPoint fCenter;
SkScalar fAngle;
sk_sp<SkImage> fImage;
- SkAutoTUnref<SkImageFilter> fFilter;
+ sk_sp<SkImageFilter> fFilter;
public:
BackdropView() {
fCenter.set(200, 150);
fAngle = 0;
fImage = GetResourceAsImage("mandrill_512.png");
- fFilter.reset(SkDilateImageFilter::Create(8, 8));
+ fFilter = SkDilateImageFilter::Make(8, 8, nullptr);
}
protected:
@@ -281,7 +281,7 @@ protected:
SkPaint paint;
paint.setAlpha(0xCC);
- canvas->saveLayer({ &bounds, &paint, fFilter, 0 });
+ canvas->saveLayer({ &bounds, &paint, fFilter.get(), 0 });
canvas->restore();
}
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698