aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ICCTest.cpp
Commit message (Collapse)AuthorAge
* Make skcms mandatoryGravatar Brian Osman2018-05-30
| | | | | | | Change-Id: I6b08cd586d313e3bc41c0da90698fc26ae1a8bb8 Reviewed-on: https://skia-review.googlesource.com/130822 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Reland "strip down SkICC.cpp"Gravatar Mike Klein2018-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 27fe397bc0cc1b091f9f85863c62b88156239cf0. Reason for revert: time to fly. Original change's description: > Revert "strip down SkICC.cpp" > > This reverts commit eab50eb9c6117c2a9d0e5648f89cebbb4dbd9d30 > and this tiny bit of e61b969a07ba3ebe9e47e61381ad16c5d2c549a2: > > https://skia-review.googlesource.com/c/skia/+/127122/3/tests/ICCTest.cpp > > Change-Id: I4306e5118a4e5eb88c05078186a28bd443fd76f7 > Reviewed-on: https://skia-review.googlesource.com/127305 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I93a6cfb66f0da0e098fdcb77ac1cd619e41614b1 Reviewed-on: https://skia-review.googlesource.com/129446 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "strip down SkICC.cpp"Gravatar Mike Klein2018-05-10
| | | | | | | | | | | | This reverts commit eab50eb9c6117c2a9d0e5648f89cebbb4dbd9d30 and this tiny bit of e61b969a07ba3ebe9e47e61381ad16c5d2c549a2: https://skia-review.googlesource.com/c/skia/+/127122/3/tests/ICCTest.cpp Change-Id: I4306e5118a4e5eb88c05078186a28bd443fd76f7 Reviewed-on: https://skia-review.googlesource.com/127305 Reviewed-by: Mike Klein <mtklein@chromium.org> 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>
* strip down SkICC.cppGravatar Mike Klein2018-05-09
| | | | | | | | | | | | | | | | Most of SkICC{.h,.cpp} is unused and gone. I've renamed the part that's left to SkWriteICCProfile() and tweaked its API just a little, leaving SkICC:WriteToICC() a wrapper around it. Most of the tests in ICCTest.cpp are moot and deleted, but a few looked somewhat valuable so I've kept them with a little modification. Change-Id: Ia1bb4c772af679885e17dac53d213c315ad0828c Reviewed-on: https://skia-review.googlesource.com/127022 Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove obsolete commentGravatar Brian Osman2018-01-03
| | | | | | | Bug: skia: Change-Id: I2f3471c45018b4439f777a711c7d4d55227f0cd1 Reviewed-on: https://skia-review.googlesource.com/90363 Reviewed-by: Brian Osman <brianosman@google.com>
* Fix Adobe RGB color space in SkiaGravatar Brian Osman2017-12-20
| | | | | | | | | | | | | | | | Our runtime definition of the XYZ matrix was fairly inaccurate. It also didn't round-trip through ICC fixed point correctly. Now, constructing the color space at runtime produces exactly the same matrix as constructing the space from the ICC profile. And the values can then be serialized back to ICC exactly. This eliminates the need for the snapping logic, too. Bug: skia: Change-Id: I69f4a9bfec3eeef153935e21ab3a0630794b1607 Reviewed-on: https://skia-review.googlesource.com/84840 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGBGravatar Brian Osman2017-12-14
| | | | | | | | Bug: skia: Change-Id: Ic914aacc4c47200714d66cf4487932bcb8a7693a Reviewed-on: https://skia-review.googlesource.com/85040 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGB"Gravatar Mike Klein2017-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 411b8ea74d66d08252d9b617d7e7d458604dbc2e. Reason for revert: a couple layout tests in the roll. :/ Original change's description: > Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGB > > Bug: skia: > Change-Id: If5935eac48184bc8cbe4db21dac4d6033a8704e6 > Reviewed-on: https://skia-review.googlesource.com/84200 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I6d2eb57b613035ec26da15218182c808bed364ed No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/84920 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Remove SkColorSpace_Base::MakeNamed, along with most uses of Adobe RGBGravatar Brian Osman2017-12-13
| | | | | | | | Bug: skia: Change-Id: If5935eac48184bc8cbe4db21dac4d6033a8704e6 Reviewed-on: https://skia-review.googlesource.com/84200 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Revert "resources: remove most uses of GetResourcePath()""Gravatar Mike Reed2017-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cca230055921d2df8708ed6f9abcc2d43468dc7f. Reason for revert: think I guessed wrong about g32 -- unreverting Original change's description: > Revert "resources: remove most uses of GetResourcePath()" > > This reverts commit 5093a539def3ae09df324018f2343827009b2e05. > > Reason for revert: google3 seems broken > > Original change's description: > > resources: remove most uses of GetResourcePath() > > > > Going forward, we will standardize on GetResourceAsData(), which will > > make it easier to run tests in environments without access to the > > filesystem. > > > > Also: GetResourceAsData() complains when a resource is missing. > > This is usually an error. > > > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > > Reviewed-on: https://skia-review.googlesource.com/82642 > > Reviewed-by: Hal Canary <halcanary@google.com> > > Commit-Queue: Hal Canary <halcanary@google.com> > > TBR=halcanary@google.com,scroggo@google.com > > Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/83001 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=halcanary@google.com,scroggo@google.com,reed@google.com Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/82942 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "resources: remove most uses of GetResourcePath()"Gravatar Mike Reed2017-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5093a539def3ae09df324018f2343827009b2e05. Reason for revert: google3 seems broken Original change's description: > resources: remove most uses of GetResourcePath() > > Going forward, we will standardize on GetResourceAsData(), which will > make it easier to run tests in environments without access to the > filesystem. > > Also: GetResourceAsData() complains when a resource is missing. > This is usually an error. > > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 > Reviewed-on: https://skia-review.googlesource.com/82642 > Reviewed-by: Hal Canary <halcanary@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> TBR=halcanary@google.com,scroggo@google.com Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/83001 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* resources: remove most uses of GetResourcePath()Gravatar Hal Canary2017-12-08
| | | | | | | | | | | | | | Going forward, we will standardize on GetResourceAsData(), which will make it easier to run tests in environments without access to the filesystem. Also: GetResourceAsData() complains when a resource is missing. This is usually an error. Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188 Reviewed-on: https://skia-review.googlesource.com/82642 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* ICC: SkICCGetColorProfileTag supports special casesGravatar Hal Canary2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | Special cases: - "sRGB" - "AdobeRGB" - "DCI-P3" - "Linear Transfer with sRGB Gamut" - "2.2 Transfer with sRGB Gamut" - "sRGB Transfer with DCI-P3 Gamut" - "Linear Transfer with DCI-P3 Gamut" - "sRGB Transfer with Rec-BT-2020 Gamut" - "Linear Transfer with Rec-BT-2020 Gamut" tools/colorspaceinfo now prints out the Tag. Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and gLinear_TransferFn, gDCIP3_TransferFn. BUG=skia:6720 Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235 Reviewed-on: https://skia-review.googlesource.com/20225 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* ICC: SkICC::WriteToICC Description Tag is function of inputGravatar Hal Canary2017-06-16
| | | | | | | | BUG=skia:6720 Change-Id: I038079a6e15f884eb77b84d9c7c75f6b7fbedd37 Reviewed-on: https://skia-review.googlesource.com/20152 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* 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>
* 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>
* 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 SkICC::rawTransferFnData()Gravatar Matt Sarett2017-01-26
| | | | | | | | | BUG=skia: Change-Id: I912b044a0091a4d396c954d1ad1d84f5f8d50f56 Reviewed-on: https://skia-review.googlesource.com/7366 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Implement SkICC::WriteICC()Gravatar Matt Sarett2016-12-20
| | | | | | | | | BUG=skia: Change-Id: Idd950c3da2c517780b24e312a4e7cc16ee413c99 Reviewed-on: https://skia-review.googlesource.com/6270 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix iOS buildGravatar Matt Sarett2016-12-18
| | | | | | | | | | | | TBR=rmistry@google.com BUG=skia: Change-Id: I5fc38227138d5433b2435d9dab13ec5ade9a26b8 Reviewed-on: https://skia-review.googlesource.com/6235 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Revert "WIP: Skia support library for ICC tasks""Gravatar Ravi Mistry2016-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eb733fbf56538838a36814c75cd03f917462cb22. Reason for revert: Revert patch was automatically merged incorrectly? Original change's description: > Revert "WIP: Skia support library for ICC tasks" > > This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab. > > Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds. > Example tasks: > * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10 > * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10 > > Original change's description: > > WIP: Skia support library for ICC tasks > > > > As a starting point, this would be mostly trivial to implement using > > SkColorSpace. > > > > This also would give us the flexibility to begin to move all of > > the ICC related code from SkColorSpace to SkICC. > > > > What are the advantages of moving this away from SkColorSpace? > > (1) A long term goal (once Chrome uses SkCodec), might be to > > move SkColorSpace::MakeICC() out of the public API. That way, > > we can guarantee that we can draw to/from *any* SkColorSpace. > > (2) Keeps SkColorSpace separate from ICC-specific representations > > like SkColorSpaceTransferFn etc. > > > > BUG=skia: > > > > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 > > Reviewed-on: https://skia-review.googlesource.com/5676 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Brian Osman <brianosman@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > > > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org > BUG=skia: > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856 > Reviewed-on: https://skia-review.googlesource.com/6232 > Commit-Queue: Ravi Mistry <rmistry@google.com> > Reviewed-by: Ravi Mistry <rmistry@google.com> > TBR=mtklein@google.com,rmistry@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com,reed@google.com BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I68b1624cfab8adfe31b17e1193a7766507dec8b0 Reviewed-on: https://skia-review.googlesource.com/6233 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
* Revert "WIP: Skia support library for ICC tasks"Gravatar Ravi Mistry2016-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc8dc3194acb959ee5980b41766660ca0644bcab. Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds. Example tasks: * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10 * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10 Original change's description: > WIP: Skia support library for ICC tasks > > As a starting point, this would be mostly trivial to implement using > SkColorSpace. > > This also would give us the flexibility to begin to move all of > the ICC related code from SkColorSpace to SkICC. > > What are the advantages of moving this away from SkColorSpace? > (1) A long term goal (once Chrome uses SkCodec), might be to > move SkColorSpace::MakeICC() out of the public API. That way, > we can guarantee that we can draw to/from *any* SkColorSpace. > (2) Keeps SkColorSpace separate from ICC-specific representations > like SkColorSpaceTransferFn etc. > > BUG=skia: > > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 > Reviewed-on: https://skia-review.googlesource.com/5676 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856 Reviewed-on: https://skia-review.googlesource.com/6232 Commit-Queue: Ravi Mistry <rmistry@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
* WIP: Skia support library for ICC tasksGravatar Matt Sarett2016-12-16
As a starting point, this would be mostly trivial to implement using SkColorSpace. This also would give us the flexibility to begin to move all of the ICC related code from SkColorSpace to SkICC. What are the advantages of moving this away from SkColorSpace? (1) A long term goal (once Chrome uses SkCodec), might be to move SkColorSpace::MakeICC() out of the public API. That way, we can guarantee that we can draw to/from *any* SkColorSpace. (2) Keeps SkColorSpace separate from ICC-specific representations like SkColorSpaceTransferFn etc. BUG=skia: Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165 Reviewed-on: https://skia-review.googlesource.com/5676 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com>