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

Unified Diff: src/core/SkBitmap.cpp

Issue 2256023002: Flush denorm half floats to zero. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix threshold, clean up tests Created 4 years, 4 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/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index e73217ea50f4eab94e16f1baedebc021f87e5f3e..26630860acda9078ea8da5a3701ecc0d636ef9e1 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -600,7 +600,7 @@ SkColor SkBitmap::getColor(int x, int y) const {
}
case kRGBA_F16_SkColorType: {
const uint64_t* addr = (const uint64_t*)fPixels + y * (fRowBytes >> 3) + x;
- Sk4f p4 = SkHalfToFloat_finite(addr[0]);
+ Sk4f p4 = SkHalfToFloat_finite_ftz(addr[0]);
if (p4[3]) {
float inva = 1 / p4[3];
p4 = p4 * Sk4f(inva, inva, inva, 1);
« no previous file with comments | « no previous file | src/core/SkColorSpaceXform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698