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

Unified Diff: src/opts/Sk4px_SSE2.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/opts/Sk4px_NEON.h ('k') | src/opts/Sk4px_none.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/Sk4px_SSE2.h
diff --git a/src/opts/Sk4px_SSE2.h b/src/opts/Sk4px_SSE2.h
index 74ccffc277227432e5266e750f8aa48de34c8c42..3809c5e47b5a955dfe6eeb794722c6950d8bb010 100644
--- a/src/opts/Sk4px_SSE2.h
+++ b/src/opts/Sk4px_SSE2.h
@@ -31,6 +31,11 @@ inline Sk4px::Wide Sk4px::widenHi() const {
_mm_unpackhi_epi8(_mm_setzero_si128(), this->fVec));
}
+inline Sk4px::Wide Sk4px::widenLoHi() const {
+ return Sk16h(_mm_unpacklo_epi8(this->fVec, this->fVec),
+ _mm_unpackhi_epi8(this->fVec, this->fVec));
+}
+
inline Sk4px::Wide Sk4px::mulWiden(const Sk16b& other) const {
return this->widenLo() * Sk4px(other).widenLo();
}
« no previous file with comments | « src/opts/Sk4px_NEON.h ('k') | src/opts/Sk4px_none.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698