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

Unified Diff: src/core/SkBitmap.cpp

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 | « no previous file | src/core/SkHalf.h » ('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 863169c458b8d76642d3aae13e923c68cb90ede3..fb7f691c934d926d0b1e03e28eb9f5bf219f5862 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -601,7 +601,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_01(addr[0]);
+ Sk4f p4 = SkHalfToFloat_finite(addr[0]);
if (p4[3]) {
float inva = 1 / p4[3];
p4 = p4 * Sk4f(inva, inva, inva, 1);
@@ -1145,7 +1145,7 @@ bool SkBitmap::ReadRawPixels(SkReadBuffer* buffer, SkBitmap* bitmap) {
SkImageInfo info;
info.unflatten(*buffer);
- // If there was an error reading "info" or if it is bogus,
+ // If there was an error reading "info" or if it is bogus,
// don't use it to compute minRowBytes()
if (!buffer->validate(SkColorTypeValidateAlphaType(info.colorType(),
info.alphaType()))) {
« no previous file with comments | « no previous file | src/core/SkHalf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698