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

Unified Diff: gm/morphology.cpp

Issue 182983003: Factory methods for heap-allocated SkImageFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 6 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/matrixconvolution.cpp ('k') | gm/offsetimagefilter.cpp » ('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 a2206b8f522b8e6c9c15335cd0f55428af2c6c5b..0b4d3af224b96941973dd40dd65b89a8b27525a8 100644
--- a/gm/morphology.cpp
+++ b/gm/morphology.cpp
@@ -74,13 +74,13 @@ protected:
for (unsigned i = 0; i < SK_ARRAY_COUNT(samples); ++i) {
const SkImageFilter::CropRect* cr = j & 0x02 ? &cropRect : NULL;
if (j & 0x01) {
- paint.setImageFilter(new SkErodeImageFilter(
+ paint.setImageFilter(SkErodeImageFilter::Create(
samples[i].fRadiusX,
samples[i].fRadiusY,
NULL,
cr))->unref();
} else {
- paint.setImageFilter(new SkDilateImageFilter(
+ paint.setImageFilter(SkDilateImageFilter::Create(
samples[i].fRadiusX,
samples[i].fRadiusY,
NULL,
« no previous file with comments | « gm/matrixconvolution.cpp ('k') | gm/offsetimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698