diff options
author | reed <reed@google.com> | 2015-03-18 12:56:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-18 12:56:46 -0700 |
commit | 422677ceab3908060917adf4181aaebb48bbaf41 (patch) | |
tree | b7ecacc9fee053c299b92e1f9dd506e39dc18f5a /src | |
parent | 24e06d5244ae96e440410e1d76e039983b2efac9 (diff) |
Add Load2/store2 to Sk4x (dumb impl for now)
patch from issue 1001003002 at patchset 1 (http://crrev.com/1001003002#ps1)
BUG=skia:
Review URL: https://codereview.chromium.org/1001453006
Diffstat (limited to 'src')
-rw-r--r-- | src/core/Sk4x.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/Sk4x.h b/src/core/Sk4x.h index 0b9796db9b..401bbd857b 100644 --- a/src/core/Sk4x.h +++ b/src/core/Sk4x.h @@ -37,6 +37,18 @@ public: void store (T[4]) const; void storeAligned(T[4]) const; + // Experimental! + static Sk4x Load2(const T src[2]) { + const T padded[4] = { src[0], src[1], 0, 0 }; + return Load(padded); + } + void store2(T dst[2]) const { + T padded[4]; + this->store(padded); + dst[0] = padded[0]; + dst[1] = padded[1]; + } + template <typename Dst> Dst reinterpret() const; template <typename Dst> Dst cast() const; |