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

Unified Diff: src/opts/SkPMFloat_sse.h

Issue 1214443002: Color dodge and burn with SkPMFloat. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: reed Created 5 years, 6 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/SkPMFloat_none.h ('k') | src/opts/SkXfermode_opts_SSE2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkPMFloat_sse.h
diff --git a/src/opts/SkPMFloat_sse.h b/src/opts/SkPMFloat_sse.h
index 802b17ba0cc6e38b7ced3f4f45f0bcda1544929a..28aa90bf29fd8d4913417f8111d92f1bc9b23448 100644
--- a/src/opts/SkPMFloat_sse.h
+++ b/src/opts/SkPMFloat_sse.h
@@ -33,4 +33,9 @@ inline SkPMColor SkPMFloat::round() const {
return c;
}
+inline Sk4f SkPMFloat::alphas() const {
+ static_assert(SK_A32_SHIFT == 24, "");
+ return _mm_shuffle_ps(fVec, fVec, 0xff); // Read as 11 11 11 11, copying lane 3 to all lanes.
+}
+
} // namespace
« no previous file with comments | « src/opts/SkPMFloat_none.h ('k') | src/opts/SkXfermode_opts_SSE2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698