aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ColorSpaceTest.cpp
Commit message (Collapse)AuthorAge
* add explicit accessor for sRGB singleton colorspacesGravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | SkColorSpace::MakeSRGB().get() is scary, and causes more ref/unref pairs than strictly necessary for these singletons. This time the implementation is still in SkColorSpace.cpp, so these should really work as singletons. Change-Id: I40f2942c8dcde3040663a04c4f5330aca90868ae Reviewed-on: https://skia-review.googlesource.com/143305 Auto-Submit: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* 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>
* update ColorSpaceTest.cpp to remove MakeICCGravatar Mike Klein2018-05-23
| | | | | | | | | | | | | The upperLeft and upperRight profiles are A2B/B2A-only, and so cannot be represented as SkColorSpace using SkColorSpace::Make(skcms_ICCProfile). They do parse fine, of course. Change-Id: Iaf51911c2b06b985037d3d5e74b043fb344e320e Reviewed-on: https://skia-review.googlesource.com/129653 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* 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>
* Convert skcms to only export functions (not data)Gravatar Brian Osman2018-05-01
| | | | | | | | | | | | | | This simplifies shared library builds on Windows (no need to conditionally change declspec to dllimport). Once this lands, we can make the same change (plus update internal references): https://skia-review.googlesource.com/c/skcms/+/124982 Change-Id: I0d4fa9031258f77d370e6e6e018afaf543c29d85 Reviewed-on: https://skia-review.googlesource.com/124983 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add test to ensure that skcms' sRGB turns into Skia's sRGB color spaceGravatar Brian Osman2018-04-30
| | | | | | | | Change-Id: Ib69926218895f9c3df8d02906188f5e54d134fad Reviewed-on: https://skia-review.googlesource.com/124265 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* IWYU for some more test files starting with 'C'.Gravatar Ben Wagner2018-04-17
| | | | | | | Change-Id: I010527b342cbfa0b425ef0d00966219413d9e77d Reviewed-on: https://skia-review.googlesource.com/121886 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* remove SkColorSpace_BaseGravatar Mike Klein2018-01-26
| | | | | | | | | | | | The type SkColorSpace_Base doesn't need to exist. Its one type() query can be answered instead by toXYZD50(). Now all that's left in the file is SkGammas, so rename it to SkGammas.h. Change-Id: Id60ddbfb342accfd5674ae89b37a24a6583ef7b8 Reviewed-on: https://skia-review.googlesource.com/99702 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* 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>
* 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>
* 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>
* resources: orgainize directory.Gravatar Hal Canary2017-12-08
| | | | | | | | | Should make it easier to ask just for images. Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd Reviewed-on: https://skia-review.googlesource.com/82684 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Avoid interpolating color lut with less than 2 pointsGravatar Matt Sarett2017-05-05
| | | | | | | | Bug: 717935 Change-Id: Ibf15b815891eef5a0239bc408bcbfe7c8b1507c5 Reviewed-on: https://skia-review.googlesource.com/15301 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: 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 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>
* Enable legacy premuls in SkColorSpaceXformGravatar Matt Sarett2017-02-22
| | | | | | | | | | | | | | | | | | | | | ***Will allow for simplified Android framework code, they typically want a color correct transform followed by a gamma encoded premul. ***Chrome does the same, so this will make it easier to replace their codecs. ***Will decrease code size. Both types of premuls are moved off the fast path here - one is essentially unused in production and the other is not "encouraged". ***Will actually make the common case faster: sRGB->sRGB means no color xform, just premul in SkSwizzler. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ia4ec1d273b6f137151f951d37c0ebf975f6b9a3e Reviewed-on: https://skia-review.googlesource.com/8848 Reviewed-by: Mike Klein <mtklein@chromium.org> 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>
* Fix color space matrix hashing to avoid hashing the typemaskGravatar Matt Sarett2017-01-04
| | | | | | | | | | BUG=skia: Change-Id: I8d4594fcf0eeebf598871bfe9203ed52460c98ce Reviewed-on: https://skia-review.googlesource.com/6558 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Improve detection of color space transfer fnsGravatar Matt Sarett2017-01-04
| | | | | | | | | BUG=skia: Change-Id: I744af0efd4d48a8932b834092ed2dbad13008c1d Reviewed-on: https://skia-review.googlesource.com/6556 Reviewed-by: Brian Osman <brianosman@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 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 SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Reject non-D50 matrices from ICC profilesGravatar Matt Sarett2016-10-31
| | | | | | | | | | | | BUG:660838 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4200 Change-Id: Ib57eb3705d6fe638e3a9cb56788937fc7e282847 Reviewed-on: https://skia-review.googlesource.com/4200 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@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>
* Add tests for ColorSpacePrimaries to XYZD50Gravatar Matt Sarett2016-10-28
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4146 Change-Id: I6725b3ae61b0db55b09a025e4cccd22046e6f056 Reviewed-on: https://skia-review.googlesource.com/4146 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>
* Hash the gamut of XYZ color spaces, to speed up comparisonGravatar Brian Osman2016-10-20
| | | | | | | | | | | | | | Also going to use this to allow caching of GrColorSpaceXforms BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3670 Change-Id: I56ed2dcbdddc22046263f56d68f2d6aea55547c8 Reviewed-on: https://skia-review.googlesource.com/3670 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Refactored SkColorSpace and added in a Lab PCS GMGravatar raftias2016-10-18
| | | | | | | | | | | | | | | | | | | | The refactoring breaks off A2B0 tag support into a separate subclass of SkColorSpace_Base, while keeping the current (besides CLUT) functionality in a XYZTRC subclass. ICC profile loading is now aware of this and creates the A2B0 subclass when SkColorSpace::NewICC() is called on a profile in need of the A2B0 functionality. The LabPCSDemo GM loads a .icc profile containing a LAB PCS and then runs a Lab->XYZ conversion on an image using it so we can display it and test out the A2B0 SkColorSpace functionality, sans a/b/m-curves, as well as the Lab->XYZ conversion code. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2389983002 Review-Url: https://codereview.chromium.org/2389983002
* 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
* SkFontData to use smart pointers.Gravatar bungeman2016-09-16
| | | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c Review-Url: https://codereview.chromium.org/2339273002
* Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of ↵Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2339273002/ ) Reason for revert: Killing Mac Original issue's description: > SkFontData to use smart pointers. > > The SkFontData type is not exposed externally, so any method which uses > it can be updated to use smart pointers without affecting external > users. Updating this first will make updating the public API much > easier. > > This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to > std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It > appears that no one outside Skia is currently using SkStream::NewfromFile > so this is a good time to update it as well. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 > > Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c TBR=mtklein@chromium.org,halcanary@google.com,mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2343933002
* SkFontData to use smart pointers.Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Review-Url: https://codereview.chromium.org/2339273002
* Fix storage of gamut transform matrices in SkColorSpaceGravatar brianosman2016-09-09
| | | | | | | | | | | | | | | We were effectively storing the transpose, which made all of our operations on individual colors, and our concatenation of matrices awkward and backwards. I'm planning to push this further into Ganesh, where I had incorrectly adjusted to the previous layout, treating colors as row vectors in the shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324843003 Review-Url: https://codereview.chromium.org/2324843003
* 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
* 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
* 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
* 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