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

Unified Diff: src/core/SkRasterPipelineBlitter.cpp

Issue 2184753002: Add Sk4h_load4 for loading F16. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo 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 | « src/core/SkNx.h ('k') | src/opts/SkNx_neon.h » ('j') | src/opts/SkNx_sse.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRasterPipelineBlitter.cpp
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index 6518a88fa91ec29ac06c1206c61556594dc33ee9..a27abbdc385b17af06f6e2aea03cc956bc0ab2ae 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -231,15 +231,13 @@ static void SK_VECTORCALL load_d_f16(SkRasterPipeline::Stage* st, size_t x,
Sk4f dr, Sk4f dg, Sk4f db, Sk4f da) {
auto ptr = st->ctx<const uint64_t*>() + x;
- // TODO: This can be made a lot more efficient with platform-specific code.
- auto p0 = SkHalfToFloat_finite(ptr[0]),
- p1 = SkHalfToFloat_finite(ptr[1]),
- p2 = SkHalfToFloat_finite(ptr[2]),
- p3 = SkHalfToFloat_finite(ptr[3]);
- dr = { p0[0], p1[0], p2[0], p3[0] };
- dg = { p0[1], p1[1], p2[1], p3[1] };
- db = { p0[2], p1[2], p2[2], p3[2] };
- da = { p0[3], p1[3], p2[3], p3[3] };
+ Sk4h rh, gh, bh, ah;
+ Sk4h_load4(ptr, &rh, &gh, &bh, &ah);
+
+ dr = SkHalfToFloat_finite(rh);
+ dg = SkHalfToFloat_finite(gh);
+ db = SkHalfToFloat_finite(bh);
+ da = SkHalfToFloat_finite(ah);
st->next(x, r,g,b,a, dr,dg,db,da);
}
« no previous file with comments | « src/core/SkNx.h ('k') | src/opts/SkNx_neon.h » ('j') | src/opts/SkNx_sse.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698