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

Unified Diff: src/opts/SkNx_neon.h

Issue 2159993003: Improve naive SkColorXform to half floats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 4 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
Index: src/opts/SkNx_neon.h
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h
index 2f73e0368d097a5bfe0f2ac11d9dd4dda0d6280f..a2e53c07e021ebe4e19b1fa7713d2a3513a74568 100644
--- a/src/opts/SkNx_neon.h
+++ b/src/opts/SkNx_neon.h
@@ -483,4 +483,14 @@ static inline Sk4i Sk4f_round(const Sk4f& x) {
return vcvtq_s32_f32((x + 0.5f).fVec);
}
+static inline void Sk4h_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk4h& b,
+ const Sk4h& a) {
+ uint16x4x4_t rgba;
mtklein 2016/07/19 15:37:47 uint16x4x4_t rgba = {{ r.fVec, g.fVec, b.
msarett 2016/07/19 15:47:20 Done. I tried that first, but the compiler compla
+ rgba.val[0] = r.fVec;
+ rgba.val[1] = g.fVec;
+ rgba.val[2] = b.fVec;
+ rgba.val[3] = a.fVec;
+ vst4_u16((uint16_t*) dst, rgba);
+}
+
#endif//SkNx_neon_DEFINED

Powered by Google App Engine
This is Rietveld 408576698