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

Unified Diff: gm/imagefilterscropped.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/imagefiltersclipped.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilterscropped.cpp
diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp
index 9f2d70025bd75807cfa4462d8cda05ef684bf825..fa834d51c07204979d23c7969b77f9cd7493ec69 100644
--- a/gm/imagefilterscropped.cpp
+++ b/gm/imagefilterscropped.cpp
@@ -134,7 +134,7 @@ protected:
SkImageFilter::CropRect cropRect(SkRect::Make(SkIRect::MakeXYWH(10, 10, 44, 44)), SkImageFilter::CropRect::kHasAll_CropEdge);
SkImageFilter::CropRect bogusRect(SkRect::Make(SkIRect::MakeXYWH(-100, -100, 10, 10)), SkImageFilter::CropRect::kHasAll_CropEdge);
- SkAutoTUnref<SkImageFilter> offset(new SkOffsetImageFilter(
+ SkAutoTUnref<SkImageFilter> offset(SkOffsetImageFilter::Create(
SkIntToScalar(-10), SkIntToScalar(-10)));
SkAutoTUnref<SkImageFilter> cfOffset(SkColorFilterImageFilter::Create(cf.get(), offset.get()));
@@ -142,12 +142,12 @@ protected:
SkImageFilter* filters[] = {
NULL,
SkColorFilterImageFilter::Create(cf.get(), NULL, &cropRect),
- new SkBlurImageFilter(1.0f, 1.0f, NULL, &cropRect),
- new SkBlurImageFilter(8.0f, 0.0f, NULL, &cropRect),
- new SkBlurImageFilter(0.0f, 8.0f, NULL, &cropRect),
- new SkBlurImageFilter(8.0f, 8.0f, NULL, &cropRect),
- new SkMergeImageFilter(NULL, cfOffset.get(), SkXfermode::kSrcOver_Mode, &cropRect),
- new SkBlurImageFilter(8.0f, 8.0f, NULL, &bogusRect),
+ SkBlurImageFilter::Create(1.0f, 1.0f, NULL, &cropRect),
+ SkBlurImageFilter::Create(8.0f, 0.0f, NULL, &cropRect),
+ SkBlurImageFilter::Create(0.0f, 8.0f, NULL, &cropRect),
+ SkBlurImageFilter::Create(8.0f, 8.0f, NULL, &cropRect),
+ SkMergeImageFilter::Create(NULL, cfOffset.get(), SkXfermode::kSrcOver_Mode, &cropRect),
+ SkBlurImageFilter::Create(8.0f, 8.0f, NULL, &bogusRect),
SkColorFilterImageFilter::Create(cf.get(), NULL, &bogusRect),
};
« no previous file with comments | « gm/imagefiltersclipped.cpp ('k') | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698