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

Unified Diff: src/core/SkNx.h

Issue 1483953002: Add Sk4f::ToBytes(uint8_t[16], Sk4f, Sk4f, Sk4f, Sk4f) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix neon Created 5 years, 1 month 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/effects/gradients/SkLinearGradient.cpp » ('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 b9b67704d4ce24fe40d384886b8f66a2ed070017..36a645cac12d9ce315abb3d4196fb03fd55fb6a3 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -113,6 +113,15 @@ public:
fHi.toBytes(bytes+N/2);
}
+ // Some implementations can do this faster.
+ static void ToBytes(uint8_t bytes[4*N],
+ const SkNx& a, const SkNx& b, const SkNx& c, const SkNx& d) {
+ a.toBytes(bytes+0*N);
+ b.toBytes(bytes+1*N);
+ c.toBytes(bytes+2*N);
+ d.toBytes(bytes+3*N);
+ }
+
SkNx operator + (const SkNx& o) const { return SkNx(fLo + o.fLo, fHi + o.fHi); }
SkNx operator - (const SkNx& o) const { return SkNx(fLo - o.fLo, fHi - o.fHi); }
SkNx operator * (const SkNx& o) const { return SkNx(fLo * o.fLo, fHi * o.fHi); }
« no previous file with comments | « bench/Sk4fBench.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698