diff options
author | 2014-12-01 10:56:05 -0800 | |
---|---|---|
committer | 2014-12-01 10:56:05 -0800 | |
commit | 6e78293ee896020104ffc4c23b565073e9a49893 (patch) | |
tree | ddbfc5b976c891adf2e318008043a76e9c4a7f8d /include/effects | |
parent | 52c293547b973f7fb5de3c83f5062b07d759ab88 (diff) |
Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)
Reason for revert:
Breaks canary builds. Will reland after the Chromium change lands.
Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88
TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/768183002
Diffstat (limited to 'include/effects')
36 files changed, 138 insertions, 7 deletions
diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index 9ba11b0812..87047e4ec2 100644 --- a/include/effects/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h @@ -64,6 +64,9 @@ public: protected: SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Style); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkPath1DPathEffect(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; // overrides from Sk1DPathEffect diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h index 97c86ec7f2..80a27a3793 100644 --- a/include/effects/Sk2DPathEffect.h +++ b/include/effects/Sk2DPathEffect.h @@ -39,6 +39,9 @@ protected: // protected so that subclasses can call this during unflattening explicit Sk2DPathEffect(const SkMatrix& mat); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit Sk2DPathEffect(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: @@ -67,6 +70,10 @@ public: protected: SkLine2DPathEffect(SkScalar width, const SkMatrix& matrix) : Sk2DPathEffect(matrix), fWidth(width) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkLine2DPathEffect(SkReadBuffer&); +#endif + virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual void nextSpan(int u, int v, int ucount, SkPath*) const SK_OVERRIDE; @@ -91,6 +98,9 @@ public: protected: SkPath2DPathEffect(const SkMatrix&, const SkPath&); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkPath2DPathEffect(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual void next(const SkPoint&, int u, int v, SkPath*) const SK_OVERRIDE; diff --git a/include/effects/SkAvoidXfermode.h b/include/effects/SkAvoidXfermode.h index c79227f762..53ce708e36 100644 --- a/include/effects/SkAvoidXfermode.h +++ b/include/effects/SkAvoidXfermode.h @@ -54,6 +54,9 @@ public: protected: SkAvoidXfermode(SkColor opColor, U8CPU tolerance, Mode mode); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkAvoidXfermode(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkBitmapSource.h b/include/effects/SkBitmapSource.h index 8b678b2eb8..27c7ae204f 100644 --- a/include/effects/SkBitmapSource.h +++ b/include/effects/SkBitmapSource.h @@ -27,6 +27,9 @@ public: protected: explicit SkBitmapSource(const SkBitmap& bitmap); SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkBitmapSource(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h index cb912c1a85..9db9f0d7d2 100644 --- a/include/effects/SkBlurDrawLooper.h +++ b/include/effects/SkBlurDrawLooper.h @@ -53,6 +53,9 @@ protected: SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, uint32_t flags); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkBlurDrawLooper(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool asABlurShadow(BlurShadowRec*) const SK_OVERRIDE; diff --git a/include/effects/SkBlurImageFilter.h b/include/effects/SkBlurImageFilter.h index 9064579bea..cfa895a6cf 100644 --- a/include/effects/SkBlurImageFilter.h +++ b/include/effects/SkBlurImageFilter.h @@ -30,6 +30,9 @@ protected: SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkBlurImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkColorCubeFilter.h b/include/effects/SkColorCubeFilter.h index ebd5e5fbb5..2cfee45e9c 100644 --- a/include/effects/SkColorCubeFilter.h +++ b/include/effects/SkColorCubeFilter.h @@ -32,6 +32,9 @@ public: protected: SkColorCubeFilter(SkData* cubeData, int cubeDimension); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkColorCubeFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h index ff163c7cd4..46f2d2aede 100644 --- a/include/effects/SkColorFilterImageFilter.h +++ b/include/effects/SkColorFilterImageFilter.h @@ -23,6 +23,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter) protected: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkColorFilterImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index 379ca5755a..dad40623f1 100644 --- a/include/effects/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h @@ -41,6 +41,9 @@ public: protected: explicit SkColorMatrixFilter(const SkColorMatrix&); explicit SkColorMatrixFilter(const SkScalar array[20]); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkColorMatrixFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkComposeImageFilter.h b/include/effects/SkComposeImageFilter.h index 0478909cd1..26eed37872 100644 --- a/include/effects/SkComposeImageFilter.h +++ b/include/effects/SkComposeImageFilter.h @@ -32,6 +32,10 @@ protected: SkASSERT(inputs[0]); SkASSERT(inputs[1]); } +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkComposeImageFilter(SkReadBuffer& buffer); +#endif + 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; diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index 6b75da66e3..e61d49405d 100644 --- a/include/effects/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h @@ -32,6 +32,9 @@ public: protected: explicit SkCornerPathEffect(SkScalar radius); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkCornerPathEffect(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index 210b378fb2..394622426d 100644 --- a/include/effects/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h @@ -55,6 +55,9 @@ public: protected: SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkDashPathEffect(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h index 18c7b4bdf8..8f1082cb40 100644 --- a/include/effects/SkDiscretePathEffect.h +++ b/include/effects/SkDiscretePathEffect.h @@ -45,6 +45,9 @@ protected: SkDiscretePathEffect(SkScalar segLength, SkScalar deviation, uint32_t seedAssist); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkDiscretePathEffect(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkDisplacementMapEffect.h b/include/effects/SkDisplacementMapEffect.h index a5296fd6a7..0a658aceaf 100644 --- a/include/effects/SkDisplacementMapEffect.h +++ b/include/effects/SkDisplacementMapEffect.h @@ -54,6 +54,9 @@ protected: SkScalar scale, SkImageFilter* inputs[2], const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkDisplacementMapEffect(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkDropShadowImageFilter.h b/include/effects/SkDropShadowImageFilter.h index a931ad00ff..c6b936a23c 100644 --- a/include/effects/SkDropShadowImageFilter.h +++ b/include/effects/SkDropShadowImageFilter.h @@ -51,6 +51,9 @@ protected: SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, ShadowMode shadowMode, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkDropShadowImageFilter(SkReadBuffer&); +#endif 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&, diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index 8b6a3c3ac2..74895fb0cf 100644 --- a/include/effects/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h @@ -37,6 +37,9 @@ public: protected: SkEmbossMaskFilter(SkScalar blurSigma, const Light& light); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkEmbossMaskFilter(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index d21e399762..5bb8b6646b 100644 --- a/include/effects/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h @@ -81,7 +81,14 @@ public: SK_TO_STRING_OVERRIDE() +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + static SkFlattenable* DeepCreateProc(SkReadBuffer& buffer) { + return CreateProc(buffer); + } + virtual Factory getFactory() const SK_OVERRIDE { return DeepCreateProc; } +#else virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } +#endif static SkFlattenable* CreateProc(SkReadBuffer& buffer); protected: diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h index 1d66383ec9..60b3f205c3 100644 --- a/include/effects/SkLayerRasterizer.h +++ b/include/effects/SkLayerRasterizer.h @@ -69,6 +69,9 @@ public: protected: SkLayerRasterizer(); SkLayerRasterizer(SkDeque* layers); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkLayerRasterizer(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; // override from SkRasterizer diff --git a/include/effects/SkLerpXfermode.h b/include/effects/SkLerpXfermode.h index 923e840c5d..d779f16777 100644 --- a/include/effects/SkLerpXfermode.h +++ b/include/effects/SkLerpXfermode.h @@ -32,6 +32,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLerpXfermode) protected: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkLerpXfermode(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkLightingImageFilter.h b/include/effects/SkLightingImageFilter.h index 323da88ec8..5fb0822666 100644 --- a/include/effects/SkLightingImageFilter.h +++ b/include/effects/SkLightingImageFilter.h @@ -75,6 +75,9 @@ protected: SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkLightingImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; const SkLight* light() const { return fLight.get(); } SkScalar surfaceScale() const { return fSurfaceScale; } diff --git a/include/effects/SkLumaColorFilter.h b/include/effects/SkLumaColorFilter.h index ae666c0bca..420999f2e8 100644 --- a/include/effects/SkLumaColorFilter.h +++ b/include/effects/SkLumaColorFilter.h @@ -35,6 +35,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLumaColorFilter) protected: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkLumaColorFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkMagnifierImageFilter.h b/include/effects/SkMagnifierImageFilter.h index 68c3fdfee4..4dd47ef7bd 100644 --- a/include/effects/SkMagnifierImageFilter.h +++ b/include/effects/SkMagnifierImageFilter.h @@ -20,6 +20,9 @@ public: protected: SkMagnifierImageFilter(const SkRect& srcRect, SkScalar inset, SkImageFilter* input); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkMagnifierImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h index b97dabe269..c04d7d1568 100644 --- a/include/effects/SkMatrixConvolutionImageFilter.h +++ b/include/effects/SkMatrixConvolutionImageFilter.h @@ -76,6 +76,9 @@ protected: SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkMatrixConvolutionImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkMatrixImageFilter.h b/include/effects/SkMatrixImageFilter.h index 0063e41630..ae6a0b7abb 100644 --- a/include/effects/SkMatrixImageFilter.h +++ b/include/effects/SkMatrixImageFilter.h @@ -43,6 +43,9 @@ protected: SkPaint::FilterLevel, SkImageFilter* input, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkMatrixImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkMergeImageFilter.h b/include/effects/SkMergeImageFilter.h index 59183e3fc1..5e723aa290 100644 --- a/include/effects/SkMergeImageFilter.h +++ b/include/effects/SkMergeImageFilter.h @@ -38,6 +38,9 @@ protected: const SkXfermode::Mode modes[], const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkMergeImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkMorphologyImageFilter.h b/include/effects/SkMorphologyImageFilter.h index ff7ed89d43..3f2be45cc5 100644 --- a/include/effects/SkMorphologyImageFilter.h +++ b/include/effects/SkMorphologyImageFilter.h @@ -34,6 +34,9 @@ protected: bool filterImageGeneric(Proc procX, Proc procY, Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const; +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkMorphologyImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; #if SK_SUPPORT_GPU virtual bool canFilterImageGPU() const SK_OVERRIDE { return true; } @@ -73,6 +76,10 @@ public: protected: SkDilateImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) : INHERITED(radiusX, radiusY, input, cropRect, uniqueID) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkDilateImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} +#endif + private: typedef SkMorphologyImageFilter INHERITED; }; @@ -101,6 +108,9 @@ public: protected: SkErodeImageFilter(int radiusX, int radiusY, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID) : INHERITED(radiusX, radiusY, input, cropRect, uniqueID) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkErodeImageFilter(SkReadBuffer& buffer) : INHERITED(buffer) {} +#endif private: typedef SkMorphologyImageFilter INHERITED; diff --git a/include/effects/SkOffsetImageFilter.h b/include/effects/SkOffsetImageFilter.h index 6a60e62bda..a870c0b8ee 100644 --- a/include/effects/SkOffsetImageFilter.h +++ b/include/effects/SkOffsetImageFilter.h @@ -28,6 +28,9 @@ public: protected: SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter* input, const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkOffsetImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkPerlinNoiseShader.h b/include/effects/SkPerlinNoiseShader.h index fc6748462c..2937926cd7 100644 --- a/include/effects/SkPerlinNoiseShader.h +++ b/include/effects/SkPerlinNoiseShader.h @@ -103,6 +103,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPerlinNoiseShader) protected: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkPerlinNoiseShader(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_OVERRIDE; @@ -112,13 +115,16 @@ private: const SkISize* tileSize); virtual ~SkPerlinNoiseShader(); - const SkPerlinNoiseShader::Type fType; - const SkScalar fBaseFrequencyX; - const SkScalar fBaseFrequencyY; - const int fNumOctaves; - const SkScalar fSeed; - const SkISize fTileSize; - const bool fStitchTiles; + // TODO (scroggo): Once all SkShaders are created from a factory, and we have removed the + // constructor that creates SkPerlinNoiseShader from an SkReadBuffer, several fields can + // be made constant. + /*const*/ SkPerlinNoiseShader::Type fType; + /*const*/ SkScalar fBaseFrequencyX; + /*const*/ SkScalar fBaseFrequencyY; + /*const*/ int fNumOctaves; + /*const*/ SkScalar fSeed; + /*const*/ SkISize fTileSize; + /*const*/ bool fStitchTiles; typedef SkShader INHERITED; }; diff --git a/include/effects/SkPictureImageFilter.h b/include/effects/SkPictureImageFilter.h index f4f1fff4ef..ed5c63c18a 100644 --- a/include/effects/SkPictureImageFilter.h +++ b/include/effects/SkPictureImageFilter.h @@ -40,6 +40,9 @@ protected: * SkReadBuffer::setBitmapDecoder() before calling this constructor. * @param SkReadBuffer Serialized picture data. */ +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkPictureImageFilter(SkReadBuffer&); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE; diff --git a/include/effects/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h index 758a5e9815..eb485b4652 100644 --- a/include/effects/SkPixelXorXfermode.h +++ b/include/effects/SkPixelXorXfermode.h @@ -26,6 +26,9 @@ public: protected: explicit SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkPixelXorXfermode(SkReadBuffer& rb); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; // override from SkXfermode diff --git a/include/effects/SkRectShaderImageFilter.h b/include/effects/SkRectShaderImageFilter.h index dc35c947ba..c4311db43e 100644 --- a/include/effects/SkRectShaderImageFilter.h +++ b/include/effects/SkRectShaderImageFilter.h @@ -34,6 +34,9 @@ public: SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) protected: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkRectShaderImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h index ec071d0e6a..8b9417900e 100644 --- a/include/effects/SkTableMaskFilter.h +++ b/include/effects/SkTableMaskFilter.h @@ -55,6 +55,9 @@ public: protected: SkTableMaskFilter(); explicit SkTableMaskFilter(const uint8_t table[256]); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkTableMaskFilter(SkReadBuffer& rb); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h index 6acd1d293c..a8186e08c2 100644 --- a/include/effects/SkTestImageFilters.h +++ b/include/effects/SkTestImageFilters.h @@ -23,6 +23,9 @@ public: protected: SkDownSampleImageFilter(SkScalar scale, SkImageFilter* input) : INHERITED(1, &input), fScale(scale) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkDownSampleImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, diff --git a/include/effects/SkTileImageFilter.h b/include/effects/SkTileImageFilter.h index 49d69a0ebf..440337a642 100644 --- a/include/effects/SkTileImageFilter.h +++ b/include/effects/SkTileImageFilter.h @@ -32,6 +32,9 @@ public: protected: SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, SkImageFilter* input, uint32_t uniqueID) : INHERITED(1, &input, NULL, uniqueID), fSrcRect(srcRect), fDstRect(dstRect) {} +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkTileImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; diff --git a/include/effects/SkTransparentShader.h b/include/effects/SkTransparentShader.h index 96de80abe5..e23687c021 100644 --- a/include/effects/SkTransparentShader.h +++ b/include/effects/SkTransparentShader.h @@ -41,6 +41,10 @@ protected: virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE {} private: +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + SkTransparentShader(SkReadBuffer& buffer) : INHERITED(buffer) {} +#endif + typedef SkShader INHERITED; }; diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h index 96d258fd08..6736889ac8 100644 --- a/include/effects/SkXfermodeImageFilter.h +++ b/include/effects/SkXfermodeImageFilter.h @@ -47,6 +47,9 @@ public: protected: SkXfermodeImageFilter(SkXfermode* mode, SkImageFilter* inputs[2], const CropRect* cropRect, uint32_t uniqueID); +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING + explicit SkXfermodeImageFilter(SkReadBuffer& buffer); +#endif virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; private: |