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

Unified Diff: src/opts/SkColor_opts_SSE2.h

Issue 724333003: Optimize SkAlphaMulQ_SSE2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkColor_opts_SSE2.h
diff --git a/src/opts/SkColor_opts_SSE2.h b/src/opts/SkColor_opts_SSE2.h
index 7e61d526b3bf4427462b59e407187d32fb52bcd6..a5d6772b60671562ab148ef216c22c9d60cc30f5 100644
--- a/src/opts/SkColor_opts_SSE2.h
+++ b/src/opts/SkColor_opts_SSE2.h
@@ -52,11 +52,9 @@ static inline __m128i SkAlphaMulQ_SSE2(const __m128i& c, const __m128i& scale) {
// uint32_t ag = ((c >> 8) & mask) * scale
__m128i ag = _mm_srli_epi16(c, 8);
- ag = _mm_and_si128(ag, mask);
ag = _mm_mullo_epi16(ag, s);
// (rb & mask) | (ag & ~mask)
- rb = _mm_and_si128(mask, rb);
mtklein 2014/11/14 14:22:58 Hmm. It'd be nice to explain / assert this for re
qiankun 2014/11/14 15:35:21 Done.
ag = _mm_andnot_si128(mask, ag);
return _mm_or_si128(rb, ag);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698