diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkFDot6.h | 1 | ||||
-rw-r--r-- | src/core/SkFontDescriptor.h | 1 | ||||
-rw-r--r-- | src/core/SkLinearBitmapPipeline_sample.h | 1 | ||||
-rw-r--r-- | src/core/SkMath.cpp | 1 | ||||
-rw-r--r-- | src/core/SkPerspIter.h | 1 | ||||
-rw-r--r-- | src/core/SkReadBuffer.cpp | 4 | ||||
-rw-r--r-- | src/core/SkReadBuffer.h | 1 | ||||
-rw-r--r-- | src/core/SkScan.h | 1 | ||||
-rw-r--r-- | src/core/SkString.cpp | 39 | ||||
-rw-r--r-- | src/core/SkValidatingReadBuffer.cpp | 4 | ||||
-rw-r--r-- | src/core/SkValidatingReadBuffer.h | 1 | ||||
-rw-r--r-- | src/core/SkWriteBuffer.cpp | 4 |
12 files changed, 6 insertions, 53 deletions
diff --git a/src/core/SkFDot6.h b/src/core/SkFDot6.h index 82138acf11..726aa2e46d 100644 --- a/src/core/SkFDot6.h +++ b/src/core/SkFDot6.h @@ -9,6 +9,7 @@ #ifndef SkFDot6_DEFINED #define SkFDot6_DEFINED +#include "SkFixed.h" #include "SkScalar.h" #include "SkMath.h" diff --git a/src/core/SkFontDescriptor.h b/src/core/SkFontDescriptor.h index cfdc571570..9b87365ed5 100644 --- a/src/core/SkFontDescriptor.h +++ b/src/core/SkFontDescriptor.h @@ -8,6 +8,7 @@ #ifndef SkFontDescriptor_DEFINED #define SkFontDescriptor_DEFINED +#include "SkFixed.h" #include "SkStream.h" #include "SkString.h" #include "SkTypeface.h" diff --git a/src/core/SkLinearBitmapPipeline_sample.h b/src/core/SkLinearBitmapPipeline_sample.h index d63509db3a..93932247cd 100644 --- a/src/core/SkLinearBitmapPipeline_sample.h +++ b/src/core/SkLinearBitmapPipeline_sample.h @@ -8,6 +8,7 @@ #ifndef SkLinearBitmapPipeline_sampler_DEFINED #define SkLinearBitmapPipeline_sampler_DEFINED +#include "SkFixed.h" #include "SkLinearBitmapPipeline_core.h" #include <array> #include <tuple> diff --git a/src/core/SkMath.cpp b/src/core/SkMath.cpp index af93d7ecb2..8a9737baa0 100644 --- a/src/core/SkMath.cpp +++ b/src/core/SkMath.cpp @@ -6,6 +6,7 @@ */ #include "SkMathPriv.h" +#include "SkFixed.h" #include "SkFloatBits.h" #include "SkFloatingPoint.h" #include "SkScalar.h" diff --git a/src/core/SkPerspIter.h b/src/core/SkPerspIter.h index 3a00971dbc..c0a9083bee 100644 --- a/src/core/SkPerspIter.h +++ b/src/core/SkPerspIter.h @@ -9,6 +9,7 @@ #ifndef SkPerspIter_DEFINED #define SkPerspIter_DEFINED +#include "SkFixed.h" #include "SkMatrix.h" class SkPerspIter { diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp index f220b5a9e6..abd46312f7 100644 --- a/src/core/SkReadBuffer.cpp +++ b/src/core/SkReadBuffer.cpp @@ -90,10 +90,6 @@ SkColor SkReadBuffer::readColor() { return fReader.readInt(); } -SkFixed SkReadBuffer::readFixed() { - return fReader.readS32(); -} - int32_t SkReadBuffer::readInt() { return fReader.readInt(); } diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h index 7b12194fc0..e77d1adfe3 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -105,7 +105,6 @@ public: // primitives virtual bool readBool(); virtual SkColor readColor(); - virtual SkFixed readFixed(); virtual int32_t readInt(); virtual SkScalar readScalar(); virtual uint32_t readUInt(); diff --git a/src/core/SkScan.h b/src/core/SkScan.h index f9443207c0..4aa8e44399 100644 --- a/src/core/SkScan.h +++ b/src/core/SkScan.h @@ -9,6 +9,7 @@ #ifndef SkScan_DEFINED #define SkScan_DEFINED +#include "SkFixed.h" #include "SkRect.h" class SkRasterClip; diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 2e2c0e7173..24b1b8fb62 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -7,7 +7,6 @@ #include "SkAtomics.h" -#include "SkFixed.h" #include "SkString.h" #include "SkUtils.h" #include <stdarg.h> @@ -143,44 +142,6 @@ char* SkStrAppendFloat(char string[], float value) { return string + len; } -char* SkStrAppendFixed(char string[], SkFixed x) { - SkDEBUGCODE(char* start = string;) - if (x < 0) { - *string++ = '-'; - x = -x; - } - - unsigned frac = x & 0xFFFF; - x >>= 16; - if (frac == 0xFFFF) { - // need to do this to "round up", since 65535/65536 is closer to 1 than to .9999 - x += 1; - frac = 0; - } - string = SkStrAppendS32(string, x); - - // now handle the fractional part (if any) - if (frac) { - static const uint16_t gTens[] = { 1000, 100, 10, 1 }; - const uint16_t* tens = gTens; - - x = SkFixedRoundToInt(frac * 10000); - SkASSERT(x <= 10000); - if (x == 10000) { - x -= 1; - } - *string++ = '.'; - do { - unsigned powerOfTen = *tens++; - *string++ = SkToU8('0' + x / powerOfTen); - x %= powerOfTen; - } while (x != 0); - } - - SkASSERT(string - start <= SkStrAppendScalar_MaxSize); - return string; -} - /////////////////////////////////////////////////////////////////////////////// // the 3 values are [length] [refcnt] [terminating zero data] diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp index ad4b6c409e..52006f23ad 100644 --- a/src/core/SkValidatingReadBuffer.cpp +++ b/src/core/SkValidatingReadBuffer.cpp @@ -66,10 +66,6 @@ SkColor SkValidatingReadBuffer::readColor() { return this->readInt(); } -SkFixed SkValidatingReadBuffer::readFixed() { - return this->readInt(); -} - int32_t SkValidatingReadBuffer::readInt() { const size_t inc = sizeof(int32_t); this->validate(IsPtrAlign4(fReader.peek()) && fReader.isAvailable(inc)); diff --git a/src/core/SkValidatingReadBuffer.h b/src/core/SkValidatingReadBuffer.h index bcdcba5de4..7fb203b45e 100644 --- a/src/core/SkValidatingReadBuffer.h +++ b/src/core/SkValidatingReadBuffer.h @@ -28,7 +28,6 @@ public: // primitives bool readBool() override; SkColor readColor() override; - SkFixed readFixed() override; int32_t readInt() override; SkScalar readScalar() override; uint32_t readUInt() override; diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp index 6baea37946..c33a7aec52 100644 --- a/src/core/SkWriteBuffer.cpp +++ b/src/core/SkWriteBuffer.cpp @@ -47,10 +47,6 @@ void SkWriteBuffer::writeBool(bool value) { fWriter.writeBool(value); } -void SkWriteBuffer::writeFixed(SkFixed value) { - fWriter.write32(value); -} - void SkWriteBuffer::writeScalar(SkScalar value) { fWriter.writeScalar(value); } |