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

Unified Diff: include/effects/SkBlurImageFilter.h

Issue 182983003: Factory methods for heap-allocated SkImageFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo Created 6 years, 10 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
Index: include/effects/SkBlurImageFilter.h
diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h
index 60dab729b40724644ada4b693f0451d77987f5c5..ba3a3ea45e2435690ccfeb08ae716193ba9cdda5 100644
--- a/include/effects/SkBlurImageFilter.h
+++ b/include/effects/SkBlurImageFilter.h
@@ -13,10 +13,12 @@
class SK_API SkBlurImageFilter : public SkImageFilter {
public:
- SkBlurImageFilter(SkScalar sigmaX,
- SkScalar sigmaY,
- SkImageFilter* input = NULL,
- const CropRect* cropRect = NULL);
+ static SkBlurImageFilter* Create(SkScalar sigmaX,
+ SkScalar sigmaY,
+ SkImageFilter* input = NULL,
+ const CropRect* cropRect = NULL) {
+ return SkNEW_ARGS(SkBlurImageFilter, (sigmaX, sigmaY, input, cropRect));
+ }
reed1 2014/03/03 18:23:19 nit: LF after }
Dominik Grewe 2014/03/04 10:29:00 Done.
virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter)
@@ -34,6 +36,14 @@ protected:
virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
+public:
+#endif
+ SkBlurImageFilter(SkScalar sigmaX,
+ SkScalar sigmaY,
+ SkImageFilter* input = NULL,
+ const CropRect* cropRect = NULL);
+
private:
SkSize fSigma;
typedef SkImageFilter INHERITED;

Powered by Google App Engine
This is Rietveld 408576698