aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorSpace.h
Commit message (Collapse)AuthorAge
* SkColorSpaceXformSteps improvements and testsGravatar Brian Osman2018-06-14
| | | | | | | | | | | | Added some helper functions and put the booleans in a nested struct (this is motivated by upcoming changes). Added a unit test of steps against skcms, with round-tripping in both combinations. Change-Id: Iea3d60cd52edb5259b5576b1422ed6f856cde815 Reviewed-on: https://skia-review.googlesource.com/134660 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* remove bit, srgbnl config in DMGravatar Mike Klein2018-05-29
| | | | | | | | | | | We're not going to need the bit. I've rewritten "esrgb" and "srgbnl" to express themselves the way I'd like them to work. Their images are supressed in Gold already. Change-Id: I6da58cc75dcb998cbfcf9a8f65de31c030adb494 Reviewed-on: https://skia-review.googlesource.com/130506 Reviewed-by: Brian Osman <brianosman@google.com>
* remove defines and add commasGravatar Cary Clark2018-05-21
| | | | | | | | | | | | | | | | | | | | | | | | Preparation for generating bookmaker files for all remaining interfaces Standardize enum and enum classes by including a comma after the last entry. Replace flatten-related #define in public interfaces with their equivalent. The motivation is to give documentation something to refer to. An alternative would be to move part or all of this out of the public interface; something I can work on in a follow-up CL. R=reed@google.com,bsalomon@google.com Bug: skia:6898 Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0 Reviewed-on: https://skia-review.googlesource.com/129312 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
* remove unused SkColorSpace::MakeGravatar Mike Klein2018-05-15
| | | | | | | | | Since we reverted the dst-color-space CL, this is no longer used. Change-Id: I50c5c1fbea2b94a1da130d50a17670c152615fb3 Reviewed-on: https://skia-review.googlesource.com/128317 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add SkColorSpace::toProfileGravatar Brian Osman2018-05-10
| | | | | | | | | | | | | | Now that A2B parsing is at least as strict as skcms_Parse, this can never fail, so switch to void. Also use the new programmatic profile helpers, which also ensures the data and profile space fields are set correctly. Bug: skia: Change-Id: Ifc4d89a919ca178c484839bdf88dae8a162c3e4f Reviewed-on: https://skia-review.googlesource.com/127336 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* non-linear blending first stepsGravatar Mike Klein2018-05-10
| | | | | | | | | | | | | | | | | | | | | | | Code: - Add a non-linear blending bit and makeNonlinearBlending() to SkColorSpace - remove enough F16=linear checks to make it possible to create surfaces and encode pngs with nonlinear F16 Testing: - add "esrgb" software config to DM, run it - add "srgbnl" software config, run it - deemphasize importance of "srgb" config on bots - update unit tests to reflect relaxed F16 constraints - add a new unit test file with _really_ basic tests, and a new unit test that's not working yet Bug: skia:7942 Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83 Reviewed-on: https://skia-review.googlesource.com/127325 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkColorSpace::Make(const skcms_ICCProfile&)Gravatar Mike Klein2018-05-09
| | | | | | | | Change-Id: Ib12208d6c148f143fdd0b54538d852b97616a72d Reviewed-on: https://skia-review.googlesource.com/127122 Commit-Queue: Mike Klein <mtklein@chromium.org> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkColorSpace::Make, taking an skcms_ICCProfileGravatar Brian Osman2018-04-17
| | | | | | | | | Bug: skia:7419 Change-Id: I912d4ae842d9cab09395fac3136e2e900611c8e5 Reviewed-on: https://skia-review.googlesource.com/121358 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add SkColorSpaceXform_skcmsGravatar Brian Osman2018-03-27
| | | | | | | | | | | Currently only enabled in Skia dev builds. Has some diffs in GMs and images, but (hopefully) nothing major. Bug: skia: Change-Id: Ifdf5d2804e59f555a3dc84f657e438dd589a2751 Reviewed-on: https://skia-review.googlesource.com/116520 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Reland "Add SkColorSpaceXform_skcms""Gravatar Brian Osman2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 57337d90a56f458451a01944efcdc205473bc0bb. Reason for revert: More investigation needed... Original change's description: > Reland "Add SkColorSpaceXform_skcms" > > This reverts commit 8103ecae7b535f011f89b03545fe768801027b6b. > > Reason for revert: Investigated the 565 diffs, they appear to be *more* correct. > > Original change's description: > > Revert "Add SkColorSpaceXform_skcms" > > > > This reverts commit 67f62b1a61016ad07b44ae5a0bbf79d97adc9ba9. > > > > Reason for revert: I want to investigate the image/colorimage gold diffs. May be correct, but some of them are pretty large. > > > > Original change's description: > > > Add SkColorSpaceXform_skcms > > > > > > Currently only enabled in Skia dev builds. Passes all unit > > > tests. Has some GM differences, but nothing major. > > > > > > Bug: skia: > > > Change-Id: Ib87f8cff44649c731e829f063ccef448d67d1910 > > > Reviewed-on: https://skia-review.googlesource.com/112520 > > > Commit-Queue: Brian Osman <brianosman@google.com> > > > Reviewed-by: Mike Klein <mtklein@google.com> > > > > TBR=mtklein@google.com,brianosman@google.com,reed@google.com > > > > Change-Id: Ib4d7174f5c2700d6f742f488e740e5a6c87ac7a8 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/113880 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > TBR=mtklein@google.com,brianosman@google.com,reed@google.com > > Change-Id: I6501ff55349a6aeed62bb64afc47f789e8cc3460 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/114040 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com,reed@google.com Change-Id: Ic9ee46032762a8b5fc96314c460ce01708673472 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/114100 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Reland "Add SkColorSpaceXform_skcms"Gravatar Brian Osman2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8103ecae7b535f011f89b03545fe768801027b6b. Reason for revert: Investigated the 565 diffs, they appear to be *more* correct. Original change's description: > Revert "Add SkColorSpaceXform_skcms" > > This reverts commit 67f62b1a61016ad07b44ae5a0bbf79d97adc9ba9. > > Reason for revert: I want to investigate the image/colorimage gold diffs. May be correct, but some of them are pretty large. > > Original change's description: > > Add SkColorSpaceXform_skcms > > > > Currently only enabled in Skia dev builds. Passes all unit > > tests. Has some GM differences, but nothing major. > > > > Bug: skia: > > Change-Id: Ib87f8cff44649c731e829f063ccef448d67d1910 > > Reviewed-on: https://skia-review.googlesource.com/112520 > > Commit-Queue: Brian Osman <brianosman@google.com> > > Reviewed-by: Mike Klein <mtklein@google.com> > > TBR=mtklein@google.com,brianosman@google.com,reed@google.com > > Change-Id: Ib4d7174f5c2700d6f742f488e740e5a6c87ac7a8 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/113880 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,brianosman@google.com,reed@google.com Change-Id: I6501ff55349a6aeed62bb64afc47f789e8cc3460 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/114040 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Add SkColorSpaceXform_skcms"Gravatar Brian Osman2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 67f62b1a61016ad07b44ae5a0bbf79d97adc9ba9. Reason for revert: I want to investigate the image/colorimage gold diffs. May be correct, but some of them are pretty large. Original change's description: > Add SkColorSpaceXform_skcms > > Currently only enabled in Skia dev builds. Passes all unit > tests. Has some GM differences, but nothing major. > > Bug: skia: > Change-Id: Ib87f8cff44649c731e829f063ccef448d67d1910 > Reviewed-on: https://skia-review.googlesource.com/112520 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,brianosman@google.com,reed@google.com Change-Id: Ib4d7174f5c2700d6f742f488e740e5a6c87ac7a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/113880 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add SkColorSpaceXform_skcmsGravatar Brian Osman2018-03-12
| | | | | | | | | | | Currently only enabled in Skia dev builds. Passes all unit tests. Has some GM differences, but nothing major. Bug: skia: Change-Id: Ib87f8cff44649c731e829f063ccef448d67d1910 Reviewed-on: https://skia-review.googlesource.com/112520 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove more functionality from SkColorSpace_BaseGravatar Brian Osman2017-12-21
| | | | | | | | | | | Push profile data into XYZ and A2B classes Move SkColorSpace_Base::MakeRGB to SkColorSpace Bug: skia: Change-Id: I4782eb2a5c77b54d302e1982654755015dea7651 Reviewed-on: https://skia-review.googlesource.com/88560 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* make SkColorSpace_New realGravatar Mike Klein2017-12-14
| | | | | | | | | | | | | | | | | | | Some interesting things are starting to fall out already, like the fact that I needed to add a gamma_dst stage to be able to draw into gamma-transfer-fn destinations. I've also had to pass an SkAlphaType through to the linearize functions so that they can maintain premul invariants. I'm not sure this is actually a good idea... if you can, please double- check my logic at SkRasterPipeline.cpp:128? If it's correct logic, I'm going to need to do it all over the place. But I imagine you don't do this and somehow get away with it. Change-Id: I42cd9b161b54287d674225103ad9e19f8b388959 Reviewed-on: https://skia-review.googlesource.com/84680 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Push much of the SkColorSpace_Base interface up to SkColorSpaceGravatar Brian Osman2017-12-12
| | | | | | | | | | | Some pieces still remain, but the next step looks less mechanical, so I wanted to land this piece independently. Bug: skia: Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2 Reviewed-on: https://skia-review.googlesource.com/84120 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Add support for transfer functions to GrColorSpaceXformGravatar Brian Osman2017-10-31
| | | | | | | | | | | | | | | | | | | With this change, untagged sources (eg N32) are treated as sRGB data, which causes a huge number of GMs to render more correctly in GPU sRGB/F16/etc... configs. Also, because the sources are treated as having a color space, we actually do gamut conversion for wide or narrow gamut outputs. This change also applies the transfer function math to individual colors in the case of gradient stops and color shaders. (The CPU backend doesn't do this yet, but I think we've decided there's no reason not to support it). Bug: skia: Change-Id: If76e9e4a268f9f74110ff4bbe4fe189ba5d19d9f Reviewed-on: https://skia-review.googlesource.com/64100 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* add Type enum to SkColorSpaceGravatar Mike Reed2017-10-27
| | | | | | | | Bug: 727128 Change-Id: I116de4efd6e64504a4e1892f431f528533b1173a Reviewed-on: https://skia-review.googlesource.com/64261 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Hide ctors of SkShader, SkImage & SkColorSpaceGravatar Florin Malita2017-05-26
| | | | | | | | | To prevent external clients from subclassing. Change-Id: I60a3833bf64019aea2f537850ca2a1ae38bb8767 Reviewed-on: https://skia-review.googlesource.com/18038 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Delete SkColorSpace::ColorSpaceFlagsGravatar Matt Sarett2017-03-24
| | | | | | | | | BUG=skia: Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e Reviewed-on: https://skia-review.googlesource.com/10105 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkTransferFunctionBehavior flag: Use in codec and encoderGravatar Matt Sarett2017-03-24
| | | | | | | | | | | | | | This is a step towards removing the non-linear blending flag from SkColorSpace. The flag on SkColorSpace used to control the premul behavior - now it is controlled by this option. BUG=skia: Change-Id: Ia29bd8c2b0596a93c6aa14332dcd9bd39e388a90 Reviewed-on: https://skia-review.googlesource.com/10008 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Expose SkColorSpaceTransferFn inversion functionGravatar Brian Osman2017-03-14
| | | | | | | | | | | Also adds tolerance to checks against zero BUG=skia: Change-Id: I2ad5737c6eef7e3ed52a685dceb347a434607336 Reviewed-on: https://skia-review.googlesource.com/9643 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Add SkColorSpace::isSRGB()Gravatar Matt Sarett2017-03-06
| | | | | | | | | BUG=skia: Change-Id: I124480a15e0c3cb01f4e22397c0a116f2d1c0d7d Reviewed-on: https://skia-review.googlesource.com/9239 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Add SkColorSpace::isNumericalTransferFn() to the public APIGravatar Matt Sarett2017-02-28
| | | | | | | | | | | | | | | This adds a little more flexibility for clients wanting to handle color space transformation outside of the codecs. Ex: they can leave the encoded data as is and apply the numerical transfer fn in a later step. BUG=skia: Change-Id: Ieca53b01648d4cb9cf0995715deacd4c4876900f Reviewed-on: https://skia-review.googlesource.com/9077 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Use non-linear blending flag in raster pipeline blitterGravatar Matt Sarett2017-02-15
| | | | | | | | | | | BUG=skia: Change-Id: I00b52e6de3b46b7d26c1df2aa63c521b6c7ece2d Reviewed-on: https://skia-review.googlesource.com/8526 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Non linear blending flag for SkColorSpaceGravatar Brian Osman2017-02-15
| | | | | | | | | | BUG=skia:6242 Change-Id: I63cce6019ce854ba807b2a819ef4fe3214898bee Reviewed-on: https://skia-review.googlesource.com/8344 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Delete legacy named color space APIGravatar Matt Sarett2017-02-10
| | | | | | | | | BUG=skia: Change-Id: I3a41b5affdfad830cea969a1e4932794d27f4f7a Reviewed-on: https://skia-review.googlesource.com/8331 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | | Reland from: https://skia-review.googlesource.com/c/8021/ BUG=skia: Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a Reviewed-on: https://skia-review.googlesource.com/8136 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "SkColorSpace: remove named API, add gamut API"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | BUG=skia: Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 Reviewed-on: https://skia-review.googlesource.com/8021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add toXYZD50() to SkColorSpace APIGravatar Matt Sarett2017-02-06
| | | | | | | | | | BUG=skia: Change-Id: I996877c9482453fc5ff58b0f66fa29715bea2191 Reviewed-on: https://skia-review.googlesource.com/8024 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Fix swapped interpretation of c and e in SkColorSpace_ICCGravatar Matt Sarett2016-12-19
| | | | | | | | | | | | | | | | The ICC errata supports the opposite of what we do. http://www.color.org/icc_specs2.xalter TBR=reed@google.com BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I18ace7f312926b264e624c30d8cb983eff5c434b Reviewed-on: https://skia-review.googlesource.com/6277 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAMGravatar Mike Reed2016-11-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4384 Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0 Reviewed-on: https://skia-review.googlesource.com/4384 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove unneeded SkColorSpace constructorGravatar Matt Sarett2016-10-28
| | | | | | | | | | | | | TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4140 Change-Id: Ib1c477b6b56a100ea449ffa20bdf18041c044a78 Reviewed-on: https://skia-review.googlesource.com/4140 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Rename all color space factories from New* to Make*Gravatar Brian Osman2016-10-24
| | | | | | | | | | | | | | | | | | | | | Matches our naming convention for all other types - factories that return sk_sp (or any type that intelligently manages its own lifetime) are named Make. Previous factories are still around, assuming SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that define for Android, etc. See also: https://codereview.chromium.org/2442053002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822 Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d Reviewed-on: https://skia-review.googlesource.com/3822 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Add NewRGB() with float gamma to SkColorSpace public APIGravatar Matt Sarett2016-10-14
| | | | | | | | | | | | | Necessary because PNGs like to specify their gamma this way. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3402 Change-Id: I399984d611db907b115b345df1afc88d39326fbb Reviewed-on: https://skia-review.googlesource.com/3402 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Removed makeLinearGamma() from the public API for SkColorSpaceGravatar raftias2016-10-13
| | | | | | | | | | | | | | | It will now reside in SkColorSpace_Base. Future work for SkColorSpace will cause this function to not be desirable or sensible to call on all SkColorSpaces. Call sites were changed to make a kSRGBLinear_Named instead of kSRGB_Named -> makeLinearGamma() (the majority of cases), and if that was not possible, SkColorSpace_Base::makeLinearGamma() was called instead. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2412613005 Review-Url: https://codereview.chromium.org/2412613005
* Add SkColorSpaceTransferFn to SkColorSpaceGravatar Matt Sarett2016-10-11
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3178 Change-Id: I354342d4469cee0e25a7b0d189e925e431da623c Reviewed-on: https://skia-review.googlesource.com/3178 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add SkColorSpacePrimaries to help with making D50 matricesGravatar msarett2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2304753002 Review-Url: https://codereview.chromium.org/2304753002
* Move toXYZD50() to SkColorSpace_BaseGravatar msarett2016-09-28
| | | | | | | | | | | | SkColorSpace needs to become more versatile, in order to support profiles that cannot specified with just a "to XYZ D50" matrix. This a just first step to clean up the public API. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381553002 Review-Url: https://codereview.chromium.org/2381553002
* Added kSRGBLinear_Named color space, along with testsGravatar brianosman2016-09-27
| | | | | | | | | | | | Gradients (and other shaders) are going to end up serializing this particular color space very frequently, so we want a shorthand way of writing it out. I think it's also helpful to have a clearer way of creating it (vs. NewNamed(kSRGB_Named)->makeLinearGamma()). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2377763002 Review-Url: https://codereview.chromium.org/2377763002
* Cache the inverse matrix on SkColorSpace. Rename xyz() to toXYZ().Gravatar brianosman2016-09-08
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2323003002 Review-Url: https://codereview.chromium.org/2323003002
* Delete deprecated GammaNamedGravatar msarett2016-09-08
| | | | | | | | TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2320893002 Review-Url: https://codereview.chromium.org/2320893002
* Rename SkColorSpace::GammaNamed to SkColorSpace::RenderTargetGammaGravatar msarett2016-09-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293002 Review-Url: https://codereview.chromium.org/2319293002
* Delete SkColorSpace::gammaNamed() from public APIGravatar msarett2016-09-07
| | | | | | | | | Move fGammaNamed to SkColorSpace_Base. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318663003 Review-Url: https://codereview.chromium.org/2318663003
* Add gammaIsLinear() API to SkColorSpaceGravatar msarett2016-09-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319073002 Review-Url: https://codereview.chromium.org/2319073002
* Delete SkColorSpace::kUnknown_Named, remove fNamed fieldGravatar msarett2016-09-06
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002 Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e Review-Url: https://codereview.chromium.org/2302413002
* Delete kInvalid_GammaNamed (part 2)Gravatar msarett2016-09-05
| | | | | | | | | We are done using this for UMA. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2306123002 Review-Url: https://codereview.chromium.org/2306123002
* Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset ↵Gravatar mgiuca2016-09-05
| | | | | | | | | | | | | | | | | | | | | | | #1 id:20001 of https://codereview.chromium.org/2302413002/ ) Reason for revert: This CL introduced two static initializers (gAdobeRGB and gSRGB) which are causing a sizes regression on Chromium builders: https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/24981 Original issue's description: > Delete SkColorSpace::kUnknown_Named, remove fNamed field > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002 > > Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e TBR=reed@google.com,brianosman@google.com,msarett@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia:5724 Review-Url: https://codereview.chromium.org/2306313002
* Delete SkColorSpace::kUnknown_Named, remove fNamed fieldGravatar msarett2016-09-02
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002 Review-Url: https://codereview.chromium.org/2302413002