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

Unified Diff: gm/tileimagefilter.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/testimagefilters.cpp ('k') | gm/xfermodeimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/tileimagefilter.cpp
diff --git a/gm/tileimagefilter.cpp b/gm/tileimagefilter.cpp
index 319aa3c9fa79a684a171b162205ecf22f971fb81..d6c8d4cbfc26bca9df18460b0410ff07fc60795c 100644
--- a/gm/tileimagefilter.cpp
+++ b/gm/tileimagefilter.cpp
@@ -83,9 +83,9 @@ protected:
SkIntToScalar(i * 4),
SkIntToScalar(bitmap->width() - i * 12),
SkIntToScalar(bitmap->height()) - i * 12);
- SkAutoTUnref<SkImageFilter> tileInput(SkNEW_ARGS(SkBitmapSource, (*bitmap)));
- SkAutoTUnref<SkImageFilter> filter(SkNEW_ARGS(
- SkTileImageFilter, (srcRect, dstRect, tileInput)));
+ SkAutoTUnref<SkImageFilter> tileInput(SkBitmapSource::Create(*bitmap));
+ SkAutoTUnref<SkImageFilter> filter(
+ SkTileImageFilter::Create(srcRect, dstRect, tileInput));
canvas->save();
canvas->translate(SkIntToScalar(x), SkIntToScalar(y));
paint.setImageFilter(filter);
« no previous file with comments | « gm/testimagefilters.cpp ('k') | gm/xfermodeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698