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

Unified Diff: src/core/SkColor.cpp

Issue 1650653002: SkNx Load/store: take any pointer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify call sites Created 4 years, 11 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 | « bench/Sk4fBench.cpp ('k') | src/core/SkGeometry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColor.cpp
diff --git a/src/core/SkColor.cpp b/src/core/SkColor.cpp
index 1794cd7d909c68a23f102d25cfe9e4c73ed0ed2f..2177194f1b56d0001360c36ba6058262ff47992c 100644
--- a/src/core/SkColor.cpp
+++ b/src/core/SkColor.cpp
@@ -105,16 +105,16 @@ SkColor SkHSVToColor(U8CPU a, const SkScalar hsv[3]) {
#include "SkNx.h"
SkPM4f SkPM4f::FromPMColor(SkPMColor c) {
- Sk4f value = SkNx_cast<float>(Sk4b::Load((const uint8_t*)&c));
+ Sk4f value = SkNx_cast<float>(Sk4b::Load(&c));
SkPM4f c4;
- (value * Sk4f(1.0f / 255)).store(c4.fVec);
+ (value * Sk4f(1.0f / 255)).store(&c4);
return c4;
}
SkColor4f SkColor4f::FromColor(SkColor c) {
- Sk4f value = SkNx_shuffle<3,2,1,0>(SkNx_cast<float>(Sk4b::Load((const uint8_t*)&c)));
+ Sk4f value = SkNx_shuffle<3,2,1,0>(SkNx_cast<float>(Sk4b::Load(&c)));
SkColor4f c4;
- (value * Sk4f(1.0f / 255)).store(c4.vec());
+ (value * Sk4f(1.0f / 255)).store(&c4);
return c4;
}
@@ -138,6 +138,6 @@ SkPM4f SkColor4f::premul() const {
#endif
SkPM4f pm4;
- dst.store(pm4.fVec);
+ dst.store(&pm4);
return pm4;
}
« no previous file with comments | « bench/Sk4fBench.cpp ('k') | src/core/SkGeometry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698