Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Unified Diff: src/opts/Sk4px_NEON.h

Issue 1230663005: 3-15% speedup to HardLight / Overlay xfermodes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add a test that widenLo() | widenHi() == widenLoHi() Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/Sk4pxXfermode.h ('k') | src/opts/Sk4px_SSE2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/Sk4px_NEON.h
diff --git a/src/opts/Sk4px_NEON.h b/src/opts/Sk4px_NEON.h
index 9401864697afff86f351c0cf551ec342665ff19a..cd6dea997945bf7020d5ac08a0ed3b278e1915da 100644
--- a/src/opts/Sk4px_NEON.h
+++ b/src/opts/Sk4px_NEON.h
@@ -40,6 +40,12 @@ inline Sk4px::Wide Sk4px::widenHi() const {
vshll_n_u8(vget_high_u8(this->fVec), 8));
}
+inline Sk4px::Wide Sk4px::widenLoHi() const {
+ auto zipped = vzipq_u8(this->fVec, this->fVec);
+ return Sk16h((uint16x8_t)zipped.val[0],
+ (uint16x8_t)zipped.val[1]);
+}
+
inline Sk4px::Wide Sk4px::mulWiden(const Sk16b& other) const {
return Sk16h(vmull_u8(vget_low_u8 (this->fVec), vget_low_u8 (other.fVec)),
vmull_u8(vget_high_u8(this->fVec), vget_high_u8(other.fVec)));
« no previous file with comments | « src/core/Sk4pxXfermode.h ('k') | src/opts/Sk4px_SSE2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698