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

Unified Diff: src/opts/SkXfermode_opts.h

Issue 1526523003: Unify some SkNx code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo Created 5 years 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/SkNx_sse.h ('k') | tests/SkNxTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkXfermode_opts.h
diff --git a/src/opts/SkXfermode_opts.h b/src/opts/SkXfermode_opts.h
index 69f2b420f5f4e6fe2166d2175803322b622a0906..93559ab8eb52d30a45ec183a0c3b6fd77ed86329 100644
--- a/src/opts/SkXfermode_opts.h
+++ b/src/opts/SkXfermode_opts.h
@@ -265,11 +265,11 @@ public:
private:
static Sk4f Load(SkPMColor c) {
- return Sk4f::FromBytes((uint8_t*)&c) * Sk4f(1.0f/255);
+ return SkNx_cast<float>(Sk4b::Load((uint8_t*)&c)) * Sk4f(1.0f/255);
}
static SkPMColor Round(const Sk4f& f) {
SkPMColor c;
- (f * Sk4f(255) + Sk4f(0.5f)).toBytes((uint8_t*)&c);
+ SkNx_cast<uint8_t>(f * Sk4f(255) + Sk4f(0.5f)).store((uint8_t*)&c);
return c;
}
inline SkPMColor xfer32(SkPMColor dst, SkPMColor src) const {
« no previous file with comments | « src/opts/SkNx_sse.h ('k') | tests/SkNxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698