aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTextBlob.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-25 06:13:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-25 06:13:47 -0700
commitb5acf6e702e318b405a04d38bfdac602dc3ed773 (patch)
treefb333817745639dba0dfc74d27d3a20de5e2b70e /include/core/SkTextBlob.h
parent8bc90e2db692e02048f15e2f165f6d61c6110419 (diff)
Add a clamp stage to SkRasterPipelineBlitter.
This clamps to [0,1] premul just before every store to memory. By making the clamp a stage itself, this design makes it easy to move the clamp around, to replace it with a debug-only assert-we're-clamped stage for certain formats, clamp in more places, programatically not clamp, etc. etc. Before this change, clamping was a little haphazard: store_srgb clamped R, G and B to [0,1], but not A, and didn't clamp the colors to A. 565 didn't clamp at all. 6 GMs draw subtly differently in sRGB, I think because we've started clamping colors to alpha to enforce premultiplication better. No changes for 565. My hope is that now no other stage need ever concern itself with clamping. So we don't double-clamp, I've added a _noclamp version of sk_linear_to_srgb() that simply asserts a clamp isn't necessary. This happens to expose the Sk4f _needs_trunc version that might be useful for power users (*cough* Matt *cough*). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178793002 Review-Url: https://codereview.chromium.org/2178793002
Diffstat (limited to 'include/core/SkTextBlob.h')
0 files changed, 0 insertions, 0 deletions