| Index: include/core/Sk64.h
|
| diff --git a/include/core/Sk64.h b/include/core/Sk64.h
|
| index 6db3001fb55b8086f9807db0b6010a7d056a9921..eba8b684c651f0c62f45a484959eebd625d5c3a8 100644
|
| --- a/include/core/Sk64.h
|
| +++ b/include/core/Sk64.h
|
| @@ -10,7 +10,7 @@
|
| #ifndef Sk64_DEFINED
|
| #define Sk64_DEFINED
|
|
|
| -#include "SkFixed.h"
|
| +#include "SkTypes.h"
|
|
|
| /** \class Sk64
|
|
|
| @@ -28,33 +28,10 @@ struct SK_API Sk64 {
|
| */
|
| SkBool is64() const { return fHi != ((int32_t)fLo >> 31); }
|
|
|
| - /** Returns non-zero if the Sk64 can be represented as a signed 48 bit integer. Used to know
|
| - if we can shift the value down by 16 to treat it as a SkFixed.
|
| - */
|
| - SkBool isFixed() const;
|
| -
|
| /** Return the signed 32 bit integer equivalent. Asserts that is32() returns non-zero.
|
| */
|
| int32_t get32() const { SkASSERT(this->is32()); return (int32_t)fLo; }
|
|
|
| - /** Return the number >> 16. Asserts that this does not loose any significant high bits.
|
| - */
|
| - SkFixed getFixed() const {
|
| - SkASSERT(this->isFixed());
|
| -
|
| - uint32_t sum = fLo + (1 << 15);
|
| - int32_t hi = fHi;
|
| - if (sum < fLo) {
|
| - hi += 1;
|
| - }
|
| - return (hi << 16) | (sum >> 16);
|
| - }
|
| -
|
| - /** Return the number >> 30. Asserts that this does not loose any
|
| - significant high bits.
|
| - */
|
| - SkFract getFract() const;
|
| -
|
| /** Returns the square-root of the number as a signed 32 bit value. */
|
| int32_t getSqrt() const;
|
|
|
| @@ -168,36 +145,6 @@ struct SK_API Sk64 {
|
| */
|
| void div(int32_t, DivOptions);
|
|
|
| - /** return (this + other >> 16) as a 32bit result */
|
| - SkFixed addGetFixed(const Sk64& other) const {
|
| - return this->addGetFixed(other.fHi, other.fLo);
|
| - }
|
| -
|
| - /** return (this + Sk64(hi, lo) >> 16) as a 32bit result */
|
| - SkFixed addGetFixed(int32_t hi, uint32_t lo) const {
|
| -#ifdef SK_DEBUG
|
| - Sk64 tmp(*this);
|
| - tmp.add(hi, lo);
|
| -#endif
|
| -
|
| - uint32_t sum = fLo + lo;
|
| - hi += fHi + (sum < fLo);
|
| - lo = sum;
|
| -
|
| - sum = lo + (1 << 15);
|
| - if (sum < lo)
|
| - hi += 1;
|
| -
|
| - hi = (hi << 16) | (sum >> 16);
|
| - SkASSERT(hi == tmp.getFixed());
|
| - return hi;
|
| - }
|
| -
|
| - /** Return the result of dividing the number by denom, treating the answer
|
| - as a SkFixed. (*this) << 16 / denom. It is an error for denom to be 0.
|
| - */
|
| - SkFixed getFixedDiv(const Sk64& denom) const;
|
| -
|
| friend bool operator==(const Sk64& a, const Sk64& b) {
|
| return a.fHi == b.fHi && a.fLo == b.fLo;
|
| }
|
|
|