Chromium Code Reviews| Index: include/effects/SkPictureImageFilter.h |
| diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h |
| index a10d23eebb2454264552d4c27602563aab5072f1..7bce7db1f39304c2dc939915fa993169d76cdc41 100644 |
| --- a/include/effects/SkPictureImageFilter.h |
| +++ b/include/effects/SkPictureImageFilter.h |
| @@ -16,13 +16,17 @@ public: |
| /** |
| * Refs the passed-in picture. |
| */ |
| - explicit SkPictureImageFilter(SkPicture* picture); |
| + static SkPictureImageFilter* Create(SkPicture* picture) { |
| + return SkNEW_ARGS(SkPictureImageFilter, (picture)); |
| + } |
| /** |
| * Refs the passed-in picture. rect can be used to crop or expand the destination rect when |
| * the picture is drawn. (No scaling is implied by the dest rect; only the CTM is applied.) |
| */ |
| - SkPictureImageFilter(SkPicture* picture, const SkRect& rect); |
| + static SkPictureImageFilter* Create(SkPicture* picture, const SkRect& rect) { |
|
reed1
2014/03/04 16:56:42
'rect' is a pretty unmeaningful parameter name. Do
Stephen White
2014/03/04 18:18:00
Yep, it's the bounds in world space (it gets trans
Dominik Grewe
2014/03/07 16:43:38
Changed it to cropRect.
|
| + return SkNEW_ARGS(SkPictureImageFilter, (picture, rect)); |
| + } |
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) |
| @@ -39,6 +43,12 @@ protected: |
| virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, |
| SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; |
| +#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
| +public: |
| +#endif |
| + explicit SkPictureImageFilter(SkPicture* picture); |
| + SkPictureImageFilter(SkPicture* picture, const SkRect& rect); |
| + |
| private: |
| SkPicture* fPicture; |
| SkRect fRect; |