Go to file
mtklein b5acf6e702 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
2016-07-25 06:13:47 -07:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Remove unnecessary getColorSpace() API from SkCodec 2016-07-21 11:57:49 -07:00
bin Change SKPs to new asset management format 2016-07-22 08:31:07 -07:00
build_overrides GN 2016-06-23 10:29:30 -07:00
cmake Delete the legacy SVG parser 2016-07-19 06:12:54 -07:00
debugger Fix old debugger 2016-04-29 14:02:18 -07:00
dm DM: don't redirect stderr to verbose.log 2016-07-22 12:23:46 -07:00
example Add SkColorSpace to GrDrawContext 2016-07-21 13:28:36 -07:00
experimental Add destination color space to AsFPArgs. Eliminates last XFORMTODO. 2016-07-25 05:12:53 -07:00
fuzz Port FuzzPathop from chromium 2016-07-19 16:50:03 -07:00
gm Add destination color space to AsFPArgs. Eliminates last XFORMTODO. 2016-07-25 05:12:53 -07:00
gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
gyp Add SkRasterPipeline blitter. 2016-07-22 11:05:04 -07:00
include Add destination color space to AsFPArgs. Eliminates last XFORMTODO. 2016-07-25 05:12:53 -07:00
infra Update SKP version 2016-07-24 01:30:17 -07:00
platform_tools Update documents/scripts for SampleApp removal 2016-07-12 09:12:39 -07:00
resources Use hintgasp font when testing rendering. 2016-07-12 06:55:25 -07:00
samplecode Add SkColorSpace to GrDrawContext 2016-07-21 13:28:36 -07:00
site Change SKPs to new asset management format 2016-07-22 08:31:07 -07:00
src Add a clamp stage to SkRasterPipelineBlitter. 2016-07-25 06:13:47 -07:00
tests fix fuzz 2016-07-25 06:05:08 -07:00
third_party Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
tools webpages_playback: Make --upload_to_partner_bucket work without --upload 2016-07-25 05:18:15 -07:00
.gitignore Add CIPD support for bot assets 2016-06-28 04:41:49 -07:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS SkPDF: Use type 2/3 shading for gradient shaders 2016-06-17 12:38:54 -07:00
BUILD.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
codereview.settings Automatically add a docs preview link and NOTRY=true when there are only docs changes. 2015-02-26 10:16:13 -08:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS GN: remove hooks again 2016-07-21 13:54:39 -07:00
Doxyfile Documentation: SkCanvas API 2015-05-19 10:21:29 -07:00
gyp_skia Make Win runtime DLLs writeable before overwriting 2016-03-18 08:33:38 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
LICENSE Include resources directory in google3 sync. 2015-10-20 13:00:48 -07:00
make.bat Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
make.py GYP: remove stale skia_scalar gyp variable 2015-11-10 13:25:12 -05:00
Makefile Add visualbench as valid target to Makefile 2015-12-18 08:05:06 -08:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Specifying master names with "master." prefix is deprecated 2016-07-13 12:57:42 -07:00
public.bzl Add SK_SUPPORT_LEGACY_ACCESSBITMAP to public.bzl. 2016-07-22 06:19:21 -07:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
whitespace.txt Trigger bots and upload images to Gold 2016-07-21 05:38:49 -07:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.