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

Unified Diff: src/core/SkNx.h

Issue 2134753006: Add Sk4f_RoundToInt (Closed) Base URL: https://skia.googlesource.com/skia.git@xformrefactor
Patch Set: Fix vector conversion 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
« no previous file with comments | « no previous file | src/opts/SkColorXform_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkNx.h
diff --git a/src/core/SkNx.h b/src/core/SkNx.h
index d0c7f41f1cd1b4b3b8a7e64b4b8fc9a4c6d43408..40c1ac69ce295b0122f265286150f8331bca43f4 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -299,6 +299,15 @@ typedef SkNx<4, int> Sk4i;
#include "../opts/SkNx_sse.h"
#elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON)
#include "../opts/SkNx_neon.h"
+#else
+
+SI Sk4i Sk4f_round(const Sk4f& x) {
+ return { (int) lrintf (x[0]),
+ (int) lrintf (x[1]),
+ (int) lrintf (x[2]),
+ (int) lrintf (x[3]), };
+}
+
#endif
SI void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d) {
« no previous file with comments | « no previous file | src/opts/SkColorXform_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698