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

Unified Diff: bench/MorphologyBench.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 | « bench/MergeBench.cpp ('k') | gm/bitmapsource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MorphologyBench.cpp
diff --git a/bench/MorphologyBench.cpp b/bench/MorphologyBench.cpp
index 0bf689eff63a26c8ed4d622c28884f6a31d1ef8c..a32bca620a3288efcd1d8378fe995c9113efaf1d 100644
--- a/bench/MorphologyBench.cpp
+++ b/bench/MorphologyBench.cpp
@@ -66,12 +66,12 @@ protected:
SkMorphologyImageFilter* mf = NULL;
switch (fStyle) {
case kDilate_MT:
- mf = new SkDilateImageFilter(SkScalarFloorToInt(fRadius),
- SkScalarFloorToInt(fRadius));
+ mf = SkDilateImageFilter::Create(SkScalarFloorToInt(fRadius),
+ SkScalarFloorToInt(fRadius));
break;
case kErode_MT:
- mf = new SkErodeImageFilter(SkScalarFloorToInt(fRadius),
- SkScalarFloorToInt(fRadius));
+ mf = SkErodeImageFilter::Create(SkScalarFloorToInt(fRadius),
+ SkScalarFloorToInt(fRadius));
break;
}
paint.setImageFilter(mf)->unref();
« no previous file with comments | « bench/MergeBench.cpp ('k') | gm/bitmapsource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698