From fb45594b6465d7549546ef8dfa05c40ea787f6e3 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 21 Dec 2018 18:56:22 +0000 Subject: [PATCH] Revert "share constructors/enum in both variants of SkReadBuffer" This reverts commit 2ae333799178bf71fac5263522b8d570f3f3e4e8. Reason for revert: broke google3 Original change's description: > share constructors/enum in both variants of SkReadBuffer > > Bug: skia: > Change-Id: I5a90e1f9a9687df2dd2f69d96ac805bf244cec50 > Reviewed-on: https://skia-review.googlesource.com/c/179844 > Reviewed-by: Mike Reed > Commit-Queue: Mike Reed > Auto-Submit: Mike Reed TBR=reed@google.com Change-Id: I4735fe2336974240edab0eb7ef23f93d461c0bdf No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/c/179857 Reviewed-by: Mike Reed Commit-Queue: Mike Reed --- src/core/SkReadBuffer.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h index 83b684c813..bbb036f0ad 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -25,6 +25,8 @@ class SkData; class SkImage; +#ifndef SK_DISABLE_READBUFFER + class SkReadBuffer { public: SkReadBuffer(); @@ -45,8 +47,6 @@ public: kSerializeFonts_Version = 67, }; -#ifndef SK_DISABLE_READBUFFER - /** * Returns true IFF the version is older than the specified version. */ @@ -227,9 +227,30 @@ private: } bool fError = false; +}; #else // #ifndef SK_DISABLE_READBUFFER +class SkReadBuffer { +public: + SkReadBuffer() {} + SkReadBuffer(const void*, size_t) {} + + enum Version { + kTileModeInBlurImageFilter_Version = 56, + kTileInfoInSweepGradient_Version = 57, + k2PtConicalNoFlip_Version = 58, + kRemovePictureImageFilterLocalSpace = 59, + kRemoveHeaderFlags_Version = 60, + kTwoColorDrawShadow_Version = 61, + kDontNegateImageSize_Version = 62, + kStoreImageBounds_Version = 63, + kRemoveOccluderFromBlurMaskFilter = 64, + kFloat4PaintColor_Version = 65, + kSaveBehind_Version = 66, + kSerializeFonts_Version = 67, + }; + bool isVersionLT(Version) const { return false; } uint32_t getVersion() const { return 0xffffffff; } void setVersion(int) {} @@ -311,7 +332,8 @@ private: static const SkDeserialProcs procs; return procs; } -#endif }; +#endif // #ifndef SK_DISABLE_READBUFFER + #endif // SkReadBuffer_DEFINED