aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/Sk2x.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-03-20 11:28:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-20 11:28:52 -0700
commit01a78130dc357e5ee746a37650dba622e0c07f8e (patch)
tree455ea9a788ec0c87fbcb9da297d19c9b4709b78e /src/core/Sk2x.h
parentf224f138da156f602e9eeedd3ddf6716662a1ca4 (diff)
Add divide to Sk2x, use native vdiv and vsqrt on ARM 64.
Tests pass on N7 + N9. BUG=skia: CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot Review URL: https://codereview.chromium.org/1027753003
Diffstat (limited to 'src/core/Sk2x.h')
-rw-r--r--src/core/Sk2x.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/Sk2x.h b/src/core/Sk2x.h
index a64ad721a5..9b4e5ee61c 100644
--- a/src/core/Sk2x.h
+++ b/src/core/Sk2x.h
@@ -49,14 +49,17 @@ public:
Sk2x add(const Sk2x&) const;
Sk2x subtract(const Sk2x&) const;
Sk2x multiply(const Sk2x&) const;
+ Sk2x divide(const Sk2x&) const;
Sk2x operator +(const Sk2x& o) const { return this->add(o); }
Sk2x operator -(const Sk2x& o) const { return this->subtract(o); }
Sk2x operator *(const Sk2x& o) const { return this->multiply(o); }
+ Sk2x operator /(const Sk2x& o) const { return this->divide(o); }
Sk2x& operator +=(const Sk2x& o) { return (*this = *this + o); }
Sk2x& operator -=(const Sk2x& o) { return (*this = *this - o); }
Sk2x& operator *=(const Sk2x& o) { return (*this = *this * o); }
+ Sk2x& operator /=(const Sk2x& o) { return (*this = *this / o); }
Sk2x negate() const { return Sk2x((T)0) - *this; }
Sk2x operator -() const { return this->negate(); }