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

Unified Diff: gm/morphology.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 | « gm/localmatriximagefilter.cpp ('k') | include/effects/SkMorphologyImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/morphology.cpp
diff --git a/gm/morphology.cpp b/gm/morphology.cpp
index c3326f9397ca91cd29e3f4ca325d49d2a109a19b..f60079b873f2a0c514c6dd46a74ec10eca1e7d1e 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -70,17 +70,15 @@ protected:
for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) {
const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : nullptr;
if (j & 0x01) {
- paint.setImageFilter(SkErodeImageFilter::Create(
- samples[i].fRadiusX,
- samples[i].fRadiusY,
- nullptr,
- cr))->unref();
+ paint.setImageFilter(SkErodeImageFilter::Make(samples[i].fRadiusX,
+ samples[i].fRadiusY,
+ nullptr,
+ cr));
} else {
- paint.setImageFilter(SkDilateImageFilter::Create(
- samples[i].fRadiusX,
- samples[i].fRadiusY,
- nullptr,
- cr))->unref();
+ paint.setImageFilter(SkDilateImageFilter::Make(samples[i].fRadiusX,
+ samples[i].fRadiusY,
+ nullptr,
+ cr));
}
this->drawClippedBitmap(canvas, paint, i * 140, j * 140);
}
« no previous file with comments | « gm/localmatriximagefilter.cpp ('k') | include/effects/SkMorphologyImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698