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

Unified Diff: include/effects/SkXfermodeImageFilter.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/SkTileImageFilter.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkXfermodeImageFilter.h
diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h
index 602dc4840493307ef3081e70f5516f4e93c2ee60..b3872a058ce0cd3a201953d92892dd252c2764f8 100644
--- a/include/effects/SkXfermodeImageFilter.h
+++ b/include/effects/SkXfermodeImageFilter.h
@@ -21,11 +21,14 @@ class SK_API SkXfermodeImageFilter : public SkImageFilter {
*/
public:
- SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* background,
- SkImageFilter* foreground = NULL, const CropRect* cropRect = NULL);
-
virtual ~SkXfermodeImageFilter();
+ static SkXfermodeImageFilter* Create(SkXfermode* mode, SkImageFilter* background,
+ SkImageFilter* foreground = NULL,
+ const CropRect* cropRect = NULL) {
+ return SkNEW_ARGS(SkXfermodeImageFilter, (mode, background, foreground, cropRect));
+ }
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkXfermodeImageFilter)
virtual bool onFilterImage(Proxy* proxy,
@@ -43,6 +46,12 @@ protected:
explicit SkXfermodeImageFilter(SkReadBuffer& buffer);
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* background,
+ SkImageFilter* foreground = NULL, const CropRect* cropRect = NULL);
+
private:
SkXfermode* fMode;
typedef SkImageFilter INHERITED;
« no previous file with comments | « include/effects/SkTileImageFilter.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698