diff options
Diffstat (limited to 'include')
26 files changed, 78 insertions, 197 deletions
diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index 638287d07c..562025351e 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -189,13 +189,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) protected: - SkComposePathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) : INHERITED(outer, inner) {} + explicit SkComposePathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} private: // illegal @@ -227,13 +223,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) protected: - SkSumPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) : INHERITED(first, second) {} + explicit SkSumPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} private: // illegal diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h index 88f3f620d2..13749fd51b 100644 --- a/include/core/SkXfermode.h +++ b/include/core/SkXfermode.h @@ -216,7 +216,8 @@ public: SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) protected: - SkXfermode(SkReadBuffer& rb) : SkFlattenable(rb) {} + SkXfermode() {} + explicit SkXfermode(SkReadBuffer& rb) : SkFlattenable(rb) {} /** The default implementation of xfer32/xfer16/xferA8 in turn call this method, 1 color at a time (upscaled to a SkPMColor). The default @@ -228,11 +229,6 @@ protected: */ virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkXfermode() {} - private: enum { kModeCount = kLastMode + 1 diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index ce49460e65..85f8ea2ac6 100644 --- a/include/effects/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h @@ -63,18 +63,14 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath1DPathEffect) protected: - SkPath1DPathEffect(SkReadBuffer& buffer); + SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Style); + explicit SkPath1DPathEffect(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; // overrides from Sk1DPathEffect virtual SkScalar begin(SkScalar contourLength) const SK_OVERRIDE; virtual SkScalar next(SkPath*, SkScalar, SkPathMeasure&) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Style); - private: SkPath fPath; // copied from constructor SkScalar fAdvance; // copied from constructor diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h index f037e33508..2adf598012 100644 --- a/include/effects/Sk2DPathEffect.h +++ b/include/effects/Sk2DPathEffect.h @@ -43,14 +43,10 @@ protected: const SkMatrix& getMatrix() const { return fMatrix; } // protected so that subclasses can call this during unflattening - Sk2DPathEffect(SkReadBuffer&); + explicit Sk2DPathEffect(const SkMatrix& mat); + explicit Sk2DPathEffect(SkReadBuffer&); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - Sk2DPathEffect(const SkMatrix& mat); - private: SkMatrix fMatrix, fInverse; bool fMatrixIsInvertible; @@ -75,17 +71,13 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLine2DPathEffect) protected: - virtual void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE; - - SkLine2DPathEffect(SkReadBuffer&); + SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) + : Sk2DPathEffect(matrix), fWidth(width) {} + explicit SkLine2DPathEffect(SkReadBuffer&); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) - : Sk2DPathEffect(matrix), fWidth(width) {} + virtual void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE; private: SkScalar fWidth; @@ -106,16 +98,12 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect) protected: - SkPath2DPathEffect(SkReadBuffer& buffer); + SkPath2DPathEffect(const SkMatrix&, const SkPath&); + explicit SkPath2DPathEffect(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkPath2DPathEffect(const SkMatrix&, const SkPath&); - private: SkPath fPath; diff --git a/include/effects/SkAvoidXfermode.h b/include/effects/SkAvoidXfermode.h index 3df8c8e9dd..a2599a8130 100644 --- a/include/effects/SkAvoidXfermode.h +++ b/include/effects/SkAvoidXfermode.h @@ -53,13 +53,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAvoidXfermode) protected: - SkAvoidXfermode(SkReadBuffer&); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkAvoidXfermode(SkColor opColor, U8CPU tolerance, Mode mode); + explicit SkAvoidXfermode(SkReadBuffer&); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: SkColor fOpColor; diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h index 76f51f54e8..2aa8fe96fa 100644 --- a/include/effects/SkBitmapSource.h +++ b/include/effects/SkBitmapSource.h @@ -25,18 +25,15 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) protected: + explicit SkBitmapSource(const SkBitmap& bitmap); + SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect); explicit SkBitmapSource(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; + virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRect* dst) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - explicit SkBitmapSource(const SkBitmap& bitmap); - SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect); - private: SkBitmap fBitmap; SkRect fSrcRect, fDstRect; diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index e7d0db3c38..732af8f8a9 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -25,6 +25,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilter) protected: + SkBlurImageFilter(SkScalar sigmaX, + SkScalar sigmaY, + SkImageFilter* input, + const CropRect* cropRect); explicit SkBlurImageFilter(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; @@ -37,14 +41,6 @@ protected: virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 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; diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index eee9927157..5cfa46896b 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -39,14 +39,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorMatrixFilter) protected: - SkColorMatrixFilter(SkReadBuffer& buffer); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif explicit SkColorMatrixFilter(const SkColorMatrix&); - SkColorMatrixFilter(const SkScalar array[20]); + explicit SkColorMatrixFilter(const SkScalar array[20]); + explicit SkColorMatrixFilter(SkReadBuffer& buffer); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: SkColorMatrix fMatrix; diff --git a/include/effects/SkComposeImageFilter.h b/include/effects/SkComposeImageFilter.h index 61a32d3ea8..32304b9646 100644 --- a/include/effects/SkComposeImageFilter.h +++ b/include/effects/SkComposeImageFilter.h @@ -21,17 +21,13 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter) protected: + SkComposeImageFilter(SkImageFilter* outer, SkImageFilter* inner) : INHERITED(outer, inner) {} explicit SkComposeImageFilter(SkReadBuffer& buffer); virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkComposeImageFilter(SkImageFilter* outer, SkImageFilter* inner) : INHERITED(outer, inner) {} - private: typedef SkImageFilter INHERITED; }; diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index c77505be39..8bb7a50695 100644 --- a/include/effects/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h @@ -31,14 +31,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect) protected: - SkCornerPathEffect(SkReadBuffer&); + explicit SkCornerPathEffect(SkScalar radius); + explicit SkCornerPathEffect(SkReadBuffer&); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkCornerPathEffect(SkScalar radius); - private: SkScalar fRadius; diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index f69e90586a..10d8d2db4e 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -56,13 +56,9 @@ public: static SkFlattenable* CreateProc(SkReadBuffer&); protected: - SkDashPathEffect(SkReadBuffer&); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); + explicit SkDashPathEffect(SkReadBuffer&); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: void setInternalMembers(SkScalar phase); diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h index 126b408218..8373b6aa15 100644 --- a/include/effects/SkDiscretePathEffect.h +++ b/include/effects/SkDiscretePathEffect.h @@ -30,13 +30,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiscretePathEffect) protected: - SkDiscretePathEffect(SkReadBuffer&); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkDiscretePathEffect(SkScalar segLength, SkScalar deviation); + explicit SkDiscretePathEffect(SkReadBuffer&); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: SkScalar fSegLength, fPerterb; diff --git a/include/effects/SkDisplacementMapEffect.h b/include/effects/SkDisplacementMapEffect.h index 4b4ea60217..4d64aaeb41 100644 --- a/include/effects/SkDisplacementMapEffect.h +++ b/include/effects/SkDisplacementMapEffect.h @@ -51,17 +51,13 @@ public: #endif protected: - explicit SkDisplacementMapEffect(SkReadBuffer& buffer); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkDisplacementMapEffect(ChannelSelectorType xChannelSelector, ChannelSelectorType yChannelSelector, SkScalar scale, SkImageFilter* displacement, SkImageFilter* color = NULL, const CropRect* cropRect = NULL); + explicit SkDisplacementMapEffect(SkReadBuffer& buffer); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: ChannelSelectorType fXChannelSelector; diff --git a/include/effects/SkDropShadowImageFilter.h b/include/effects/SkDropShadowImageFilter.h index 05eb6a00fd..59d3145a00 100644 --- a/include/effects/SkDropShadowImageFilter.h +++ b/include/effects/SkDropShadowImageFilter.h @@ -26,20 +26,16 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter) protected: + SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigma, SkColor, + SkImageFilter* input); + SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, + SkImageFilter* input, const CropRect* cropRect); explicit SkDropShadowImageFilter(SkReadBuffer&); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&, SkIRect* dst) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigma, SkColor, - SkImageFilter* input = NULL); - SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, - SkImageFilter* input = NULL, const CropRect* cropRect = NULL); - private: SkScalar fDx, fDy, fSigmaX, fSigmaY; SkColor fColor; diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index 65dbbe7a59..a1e2af46ce 100644 --- a/include/effects/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h @@ -36,13 +36,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmbossMaskFilter) protected: - SkEmbossMaskFilter(SkReadBuffer&); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkEmbossMaskFilter(SkScalar blurSigma, const Light& light); + explicit SkEmbossMaskFilter(SkReadBuffer&); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: Light fLight; diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h index 14bccdbef9..9d8a9b6cb0 100644 --- a/include/effects/SkMagnifierImageFilter.h +++ b/include/effects/SkMagnifierImageFilter.h @@ -21,6 +21,7 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter) protected: + SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset); explicit SkMagnifierImageFilter(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; @@ -30,11 +31,6 @@ protected: virtual bool asNewEffect(GrEffectRef** effect, GrTexture* texture, const SkMatrix& matrix, const SkIRect& bounds) const SK_OVERRIDE; #endif -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset); - private: SkRect fSrcRect; SkScalar fInset; diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index ee1bfcf3d9..606de570bd 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -68,7 +68,16 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImageFilter) protected: - SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); + SkMatrixConvolutionImageFilter(const SkISize& kernelSize, + const SkScalar* kernel, + SkScalar gain, + SkScalar bias, + const SkIPoint& kernelOffset, + TileMode tileMode, + bool convolveAlpha, + SkImageFilter* input, + const CropRect* cropRect); + explicit SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, @@ -83,19 +92,6 @@ protected: const SkIRect& bounds) const SK_OVERRIDE; #endif -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkMatrixConvolutionImageFilter(const SkISize& kernelSize, - const SkScalar* kernel, - SkScalar gain, - SkScalar bias, - const SkIPoint& kernelOffset, - TileMode tileMode, - bool convolveAlpha, - SkImageFilter* input = NULL, - const CropRect* cropRect = NULL); - private: SkISize fKernelSize; SkScalar* fKernel; diff --git a/include/effects/SkMergeImageFilter.h b/include/effects/SkMergeImageFilter.h index f3f0d67f15..3ac4aaa6c3 100644 --- a/include/effects/SkMergeImageFilter.h +++ b/include/effects/SkMergeImageFilter.h @@ -30,21 +30,18 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter) protected: - SkMergeImageFilter(SkReadBuffer& buffer); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - - virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, - SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkMergeImageFilter(SkImageFilter* first, SkImageFilter* second, SkXfermode::Mode = SkXfermode::kSrcOver_Mode, const CropRect* cropRect = NULL); SkMergeImageFilter(SkImageFilter* filters[], int count, const SkXfermode::Mode modes[] = NULL, const CropRect* cropRect = NULL); + explicit SkMergeImageFilter(SkReadBuffer& buffer); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; + + virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, + SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; + private: uint8_t* fModes; // SkXfermode::Mode diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h index 0c1cc85601..a464da3d3b 100644 --- a/include/effects/SkMorphologyImageFilter.h +++ b/include/effects/SkMorphologyImageFilter.h @@ -68,15 +68,11 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter) protected: - SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input = NULL, const CropRect* cropRect = NULL) - : INHERITED(radiusX, radiusY, input, cropRect) {} + : INHERITED(radiusX, radiusY, input, cropRect) {} + explicit SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} private: typedef SkMorphologyImageFilter INHERITED; @@ -100,15 +96,11 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) protected: - SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input = NULL, const CropRect* cropRect = NULL) - : INHERITED(radiusX, radiusY, input, cropRect) {} + : INHERITED(radiusX, radiusY, input, cropRect) {} + explicit SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} private: typedef SkMorphologyImageFilter INHERITED; diff --git a/include/effects/SkOffsetImageFilter.h b/include/effects/SkOffsetImageFilter.h index 8d9db64ac1..7f17e851cb 100644 --- a/include/effects/SkOffsetImageFilter.h +++ b/include/effects/SkOffsetImageFilter.h @@ -23,19 +23,14 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkOffsetImageFilter) protected: - SkOffsetImageFilter(SkReadBuffer& buffer); + SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input, const CropRect* cropRect); + explicit SkOffsetImageFilter(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE; virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input = NULL, - const CropRect* cropRect = NULL); - private: SkVector fOffset; }; diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h index 37da208347..0a72f71417 100644 --- a/include/effects/SkPictureImageFilter.h +++ b/include/effects/SkPictureImageFilter.h @@ -31,6 +31,8 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter) protected: + explicit SkPictureImageFilter(SkPicture* picture); + SkPictureImageFilter(SkPicture* picture, const SkRect& cropRect); virtual ~SkPictureImageFilter(); /* Constructs an SkPictureImageFilter object from an SkReadBuffer. * Note: If the SkPictureImageFilter object construction requires bitmap @@ -43,12 +45,6 @@ protected: virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - explicit SkPictureImageFilter(SkPicture* picture); - SkPictureImageFilter(SkPicture* picture, const SkRect& cropRect); - private: SkPicture* fPicture; SkRect fCropRect; diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h index 837257ec2c..64648457f8 100644 --- a/include/effects/SkPixelXorXfermode.h +++ b/include/effects/SkPixelXorXfermode.h @@ -25,17 +25,13 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPixelXorXfermode) protected: - SkPixelXorXfermode(SkReadBuffer& rb); + explicit SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} + explicit SkPixelXorXfermode(SkReadBuffer& rb); virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; // override from SkXfermode virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} - private: SkColor fOpColor; diff --git a/include/effects/SkStippleMaskFilter.h b/include/effects/SkStippleMaskFilter.h index d6f8798862..30263a3689 100644 --- a/include/effects/SkStippleMaskFilter.h +++ b/include/effects/SkStippleMaskFilter.h @@ -32,15 +32,11 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: - SkStippleMaskFilter(SkReadBuffer& buffer) - : SkMaskFilter(buffer) { - } - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkStippleMaskFilter() : INHERITED() { } + explicit SkStippleMaskFilter(SkReadBuffer& buffer) + : SkMaskFilter(buffer) { + } private: typedef SkMaskFilter INHERITED; diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h index d517db6994..eda1a1ea5e 100644 --- a/include/effects/SkTableMaskFilter.h +++ b/include/effects/SkTableMaskFilter.h @@ -53,14 +53,10 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter) protected: - SkTableMaskFilter(SkReadBuffer& rb); - virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; - -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif SkTableMaskFilter(); - SkTableMaskFilter(const uint8_t table[256]); + explicit SkTableMaskFilter(const uint8_t table[256]); + explicit SkTableMaskFilter(SkReadBuffer& rb); + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: uint8_t fTable[256]; diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h index c26ae9aef8..01d6c64641 100644 --- a/include/effects/SkTileImageFilter.h +++ b/include/effects/SkTileImageFilter.h @@ -32,16 +32,12 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter) protected: + SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input) + : INHERITED(input), fSrcRect(srcRect), fDstRect(dstRect) {} explicit SkTileImageFilter(SkReadBuffer& buffer); virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; -#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS -public: -#endif - SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input) - : INHERITED(input), fSrcRect(srcRect), fDstRect(dstRect) {} - private: SkRect fSrcRect; SkRect fDstRect; diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h index a0cb728364..a5404f91c5 100644 --- a/include/effects/SkXfermodeImageFilter.h +++ b/include/effects/SkXfermodeImageFilter.h @@ -43,15 +43,11 @@ public: #endif protected: + SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* background, + SkImageFilter* foreground, const CropRect* cropRect); 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; |