aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-21 19:56:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-21 19:56:46 +0000
commit4b8f8022550daa7458ed3de207d1300917d4a8cb (patch)
treefae718eef5b69f2346b461b580a2b73527f74ef0 /include/core
parente4ae0bc5caeed52e07c7e5939fa4ac38d9e408ab (diff)
Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
This reverts commit dd50c83b5b34dab3a077741861b50ed1f2bc6b8f. BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/288343009 git-svn-id: http://skia.googlecode.com/svn/trunk@14830 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkFlattenable.h2
-rw-r--r--include/core/SkPicture.h3
-rw-r--r--include/core/SkReadBuffer.h8
-rw-r--r--include/core/SkUnitMapper.h37
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