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

Issue 2256023002: Flush denorm half floats to zero. (Closed)

Created:
4 years, 4 months ago by mtklein_C
Modified:
4 years, 4 months ago
Reviewers:
msarett, Brian Osman, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Flush denorm half floats to zero. I think we convinced ourselves that denorms, while a good chunk of half floats, cover a rather small fraction of the representable range, which is always close enough to zero to flush. This makes both paths of the conversion to or from float considerably simpler. These functions now work for zero-or-normal half floats (excluding infinite, NaN). I'm not aware of a term for this class so I've called them "ordinary". A handful of GMs and SKPs draw differently in --config f16, but all imperceptibly. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256023002 Committed: https://skia.googlesource.com/skia/+/8ae991e433d2c0814ea5579613f00173805ff057

Patch Set 1 #

Patch Set 2 : names #

Total comments: 6

Patch Set 3 : fix threshold, clean up tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -104 lines) Patch
M src/core/SkBitmap.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkColorSpaceXform.cpp View 1 2 2 chunks +9 lines, -9 lines 0 comments Download
M src/core/SkHalf.h View 1 2 3 chunks +18 lines, -30 lines 0 comments Download
M src/core/SkLinearBitmapPipeline_sample.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkMipMap.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkRasterPipelineBlitter.cpp View 1 2 2 chunks +8 lines, -8 lines 0 comments Download
M src/core/SkSpanProcs.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkXfermodeF16.cpp View 1 2 7 chunks +21 lines, -21 lines 0 comments Download
M src/effects/gradients/Sk4fGradientPriv.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/Float16Test.cpp View 1 2 2 chunks +30 lines, -29 lines 0 comments Download

Messages

Total messages: 27 (20 generated)
mtklein_C
4 years, 4 months ago (2016-08-18 00:54:58 UTC) #14
Brian Osman
lgtm Note: Smallest normalized half float is ~6.1*10^-5. Converted to sRGB, that's ~7.9*10^-4. If we ...
4 years, 4 months ago (2016-08-18 12:45:57 UTC) #15
msarett
https://codereview.chromium.org/2256023002/diff/20001/src/core/SkHalf.h File src/core/SkHalf.h (right): https://codereview.chromium.org/2256023002/diff/20001/src/core/SkHalf.h#newcode82 src/core/SkHalf.h:82: Sk4i merged = (sign >> 16) | (will_be_norm & ...
4 years, 4 months ago (2016-08-18 13:19:55 UTC) #16
mtklein_C
On 2016/08/18 at 13:19:55, msarett wrote: > https://codereview.chromium.org/2256023002/diff/20001/src/core/SkHalf.h > File src/core/SkHalf.h (right): > > https://codereview.chromium.org/2256023002/diff/20001/src/core/SkHalf.h#newcode82 ...
4 years, 4 months ago (2016-08-22 19:47:05 UTC) #19
msarett
lgtm
4 years, 4 months ago (2016-08-22 20:02:04 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2256023002/40001
4 years, 4 months ago (2016-08-22 20:18:45 UTC) #25
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 20:20:21 UTC) #27
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/8ae991e433d2c0814ea5579613f00173805ff057

Powered by Google App Engine
This is Rietveld 408576698