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

Unified Diff: include/effects/SkTestImageFilters.h

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 | « include/effects/SkResizeImageFilter.h ('k') | include/effects/SkTileImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkTestImageFilters.h
diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h
index abbaa92593e101c0c996803c2c1aebec267efd86..24f6349cd0499291d4709c999e542591ec5b1d7d 100755
--- a/include/effects/SkTestImageFilters.h
+++ b/include/effects/SkTestImageFilters.h
@@ -7,11 +7,14 @@
// Fun mode that scales down (only) and then scales back up to look pixelated
class SK_API SkDownSampleImageFilter : public SkImageFilter {
public:
- SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {}
+ static SkDownSampleImageFilter* Create(SkScalar scale) {
+ return SkNEW_ARGS(SkDownSampleImageFilter, (scale));
+ }
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
protected:
+ SkDownSampleImageFilter(SkScalar scale) : INHERITED(0), fScale(scale) {}
SkDownSampleImageFilter(SkReadBuffer& buffer);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
« no previous file with comments | « include/effects/SkResizeImageFilter.h ('k') | include/effects/SkTileImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698