diff options
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkFlattenable.h | 2 | ||||
-rw-r--r-- | include/core/SkPicture.h | 3 | ||||
-rw-r--r-- | include/core/SkReadBuffer.h | 8 | ||||
-rw-r--r-- | include/core/SkUnitMapper.h | 37 |
4 files changed, 9 insertions, 41 deletions
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index ee7a433710..f6d377a9d7 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -61,7 +61,7 @@ public: kSkPixelRef_Type, kSkRasterizer_Type, kSkShader_Type, - kSkUnitMapper_Type, + kSkUnused_Type, // used to be SkUnitMapper kSkXfermode_Type, }; diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index e17a0d4bd3..58335ac728 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -327,13 +327,14 @@ protected: // V24: SkTwoPointConicalGradient now has fFlipped flag for gradient flipping // V25: SkDashPathEffect now only writes phase and interval array when flattening // V26: Removed boolean from SkColorShader for inheriting color from SkPaint. + // V27: Remove SkUnitMapper from gradients (and skia). // Note: If the picture version needs to be increased then please follow the // steps to generate new SKPs in (only accessible to Googlers): http://goo.gl/qATVcw // Only SKPs within the min/current picture version range (inclusive) can be read. static const uint32_t MIN_PICTURE_VERSION = 19; - static const uint32_t CURRENT_PICTURE_VERSION = 26; + static const uint32_t CURRENT_PICTURE_VERSION = 27; mutable uint32_t fUniqueID; diff --git a/include/core/SkReadBuffer.h b/include/core/SkReadBuffer.h index 4da27d4fe0..e962234ddb 100644 --- a/include/core/SkReadBuffer.h +++ b/include/core/SkReadBuffer.h @@ -23,7 +23,6 @@ #include "SkReader32.h" #include "SkRefCnt.h" #include "SkShader.h" -#include "SkUnitMapper.h" #include "SkWriteBuffer.h" #include "SkXfermode.h" @@ -45,6 +44,7 @@ public: kGradientFlippedFlag_Version = 24, kDashWritesPhaseIntervals_Version = 25, kColorShaderNoBool_Version = 26, + kNoUnitMappers_Version = 27, }; /** @@ -121,9 +121,13 @@ public: SkPixelRef* readPixelRef() { return this->readFlattenable<SkPixelRef>(); } SkRasterizer* readRasterizer() { return this->readFlattenable<SkRasterizer>(); } SkShader* readShader() { return this->readFlattenable<SkShader>(); } - SkUnitMapper* readUnitMapper() { return this->readFlattenable<SkUnitMapper>(); } SkXfermode* readXfermode() { return this->readFlattenable<SkXfermode>(); } + /** + * Like readFlattenable() but explicitly just skips the data that was written for the + * flattenable (or the sentinel that there wasn't one). + */ + virtual void skipFlattenable(); // binary data and arrays virtual bool readByteArray(void* value, size_t size); diff --git a/include/core/SkUnitMapper.h b/include/core/SkUnitMapper.h deleted file mode 100644 index 46f6eddd70..0000000000 --- a/include/core/SkUnitMapper.h +++ /dev/null @@ -1,37 +0,0 @@ - -/* - * Copyright 2006 The Android Open Source Project - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - - -#ifndef SkUnitMapper_DEFINED -#define SkUnitMapper_DEFINED - -#include "SkRefCnt.h" -#include "SkScalar.h" - -#include "SkFlattenable.h" - -class SkUnitMapper : public SkFlattenable { -public: - SK_DECLARE_INST_COUNT(SkUnitMapper) - - SkUnitMapper() {} - - /** Given a value in [0..0xFFFF], return a value in the same range. - */ - virtual uint16_t mapUnit16(uint16_t x) = 0; - - SK_DEFINE_FLATTENABLE_TYPE(SkUnitMapper) - -protected: - SkUnitMapper(SkReadBuffer& rb) : SkFlattenable(rb) {} - -private: - typedef SkFlattenable INHERITED; -}; - -#endif |