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

Unified Diff: src/effects/gradients/Sk4fGradientPriv.h

Issue 2145663003: Expand _01 half<->float limitation to _finite. Simplify. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: drop _mm_packus_epi32 for now. 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/SkXfermodeF16.cpp ('k') | src/opts/SkNx_neon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/Sk4fGradientPriv.h
diff --git a/src/effects/gradients/Sk4fGradientPriv.h b/src/effects/gradients/Sk4fGradientPriv.h
index ae6fe7ce466acd7197aabddfc5cf2fc50273a02e..68e95a63d9ff7dda846dc7eecc3a8c71967f23b1 100644
--- a/src/effects/gradients/Sk4fGradientPriv.h
+++ b/src/effects/gradients/Sk4fGradientPriv.h
@@ -143,11 +143,11 @@ struct DstTraits<DstType::F16, premul> {
}
static void store(const Sk4f& c, Type* dst) {
- *dst = SkFloatToHalf_01(PM::apply(c));
+ *dst = SkFloatToHalf_finite(PM::apply(c));
}
static void store(const Sk4f& c, Type* dst, int n) {
- sk_memset64(dst, SkFloatToHalf_01(PM::apply(c)), n);
+ sk_memset64(dst, SkFloatToHalf_finite(PM::apply(c)), n);
}
static void store4x(const Sk4f& c0, const Sk4f& c1,
« no previous file with comments | « src/core/SkXfermodeF16.cpp ('k') | src/opts/SkNx_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698