aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/ColorCodecBench.cpp
Commit message (Collapse)AuthorAge
* 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>
* Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Mike Reed2017-10-03
| | | | | | | | | | This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap/imageinfo/pixmap""" This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95. Reason for revert: assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))" google3 thinks it was from surface_rowbytes Original change's description: > Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"" > > This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. > > Bug: skia: > Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d > Reviewed-on: https://skia-review.googlesource.com/52665 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=fmalita@chromium.org,reed@google.com Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | bitmap/imageinfo/pixmap"" This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. Bug: skia: Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d Reviewed-on: https://skia-review.googlesource.com/52665 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68. Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel. Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Now with legacy behavior for allocpixels > > This was reverted, so the current CL is a "fix" on top of ... > https://skia-review.googlesource.com/c/skia/+/50980 > > Related update to Chrome (in preparation for this change) > https://chromium-review.googlesource.com/c/chromium/src/+/685719 > > Bug: skia: > Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 > Reviewed-on: https://skia-review.googlesource.com/51341 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52381 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-27
| | | | | | | | | | | | | | | | Now with legacy behavior for allocpixels This was reverted, so the current CL is a "fix" on top of ... https://skia-review.googlesource.com/c/skia/+/50980 Related update to Chrome (in preparation for this change) https://chromium-review.googlesource.com/c/chromium/src/+/685719 Bug: skia: Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 Reviewed-on: https://skia-review.googlesource.com/51341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Greg Daniel2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-26
| | | | | | | | | | | | | | | Previously we had size_t and uint64_t variations. The new (simpler) API always.. - returns size_t, or 0 if the calculation overflowed - returns the trimmed size (does not include rowBytes padding for the last row) Bug: skia: Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e Reviewed-on: https://skia-review.googlesource.com/50980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> 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>
* 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>
* refFoo variant for getters that naturally have a sk_spGravatar Mike Reed2017-01-12
| | | | | | | | | | BUG=skia: Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388 Reviewed-on: https://skia-review.googlesource.com/6923 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Reed <reed@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>
* Delete qcmsGravatar Matt Sarett2016-11-01
| | | | | | | | | | | | | | | | | | | | This was always intended to be a temporary dependency to use for testing. It has served its purpose. Also, this has already been dropped (accidentally, I think) by the new GN build. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4220 Change-Id: Ic72ee08bbfaf86ed86a4122fd38be2921eb1327e Reviewed-on: https://skia-review.googlesource.com/4220 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@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>
* 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
* Cache dst LUTs in SkColorSpaceXformGravatar Matt Sarett2016-10-16
| | | | | | | | | | | | | | | | | | | | | | This is only useful in the rare case that the dst does not fall into one of our main paths. But it's a good optimization, since this does happen, and typically, the dst won't change. ColorCodecBench z620 --nonstd --xform_only Without Patch 511us With Patch 348us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3400 Change-Id: Ibf68d9ce7072680465662922f4aa15630545e3d6 Reviewed-on: https://skia-review.googlesource.com/3400 Reviewed-by: Mike Klein <mtklein@chromium.org> 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 SkColorSpaceXform to the public APIGravatar msarett2016-10-11
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2390263002 Review-Url: https://codereview.chromium.org/2390263002
* Add BGRA as input format to SkColorSpaceXformGravatar msarett2016-09-22
| | | | | | | | | | This is immediately useful for webp and I think it's a fair guess that BGRA src formats are not uncommon. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353363008 Review-Url: https://codereview.chromium.org/2353363008
* Make SkColorSpaceXform::New() take bare ptrsGravatar msarett2016-09-22
| | | | | | | | | | There's no need to take sk_sp if we're not going to ref the ptr. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360863003 Review-Url: https://codereview.chromium.org/2360863003
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 Review-Url: https://codereview.chromium.org/2339233003
* Revert of Support Float32 output from SkColorSpaceXform (patchset #7 ↵Gravatar msarett2016-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/2339233003/ ) Reason for revert: Hitting an assert Original issue's description: > Support Float32 output from SkColorSpaceXform > > * Adds Float32 support to SkColorSpaceXform > * Changes API to allows clients to ask for F32, updates clients to > new API > * Adds Sk4f_load4 and Sk4f_store4 to SkNx > * Make use of new xform in SkGr.cpp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 > CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47 TBR=brianosman@google.com,mtklein@google.com,scroggo@google.com,mtklein@chromium.org,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2347473007
* Support Float32 output from SkColorSpaceXformGravatar msarett2016-09-16
| | | | | | | | | | | | | | * Adds Float32 support to SkColorSpaceXform * Changes API to allows clients to ask for F32, updates clients to new API * Adds Sk4f_load4 and Sk4f_store4 to SkNx * Make use of new xform in SkGr.cpp BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2339233003
* Reduce overhead for linear color xformsGravatar msarett2016-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to build src and dst transfer fn tables every time a new xform was created with linear src and dst. Now we don't compute them because we don't need them. This will make SkColorSpaceXform a far better option for any xforms with float or half-float inputs or outputs, particularly on a small number of pixels. This CL also moves SkColorSpaceXform closer to what I anticipate will be the eventual 'API design'. I think apply() will want to take a SrcColorType enum (not created yet because it's not necessary yet) and a DstColorType enum (still using SkColorType because there's not yet a reason not to). Performance changes: toSRGB 341us -> 366us to2Dot2 404us -> 403us toF16 318us -> 304us There's no reason for toSRGB or to2Dot2 to change. The refactor seems to have caused the compiler to order the instructions a little differently... This is something to come back to if we need to squeeze more performance out of sRGB. For now, let's not be held up by something we don't control. F16 likely improves because we are no longer (unnecessarily) building the linear tables. Code size gets a little bigger. Measuring SkColorSpaceXform size as a percentage of src/ size, we go from 0.8% to 1.4%. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335723002 Review-Url: https://codereview.chromium.org/2335723002
* change SkStreams to work with sk_sp<SkData> instead of SkData*Gravatar reed2016-09-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002 Review-Url: https://codereview.chromium.org/2333713002
* Checking for valid colorType, alphaType, colorSpace in SkCodecGravatar msarett2016-09-08
| | | | | | | | | | | | | | | | | * Refactor to share code between SkPngCodec and SkWebpCodec * Didn't end up sharing with SkJpegCodec but did refactor that code a bit * Disallow conversions to F16 with non-linear color spaces * Fail to decode if we fail to create a SkColorSpaceXform (should be an assert soon). We used to fallback on a legacy decode if we failed to create the transform. * A bunch of name changes BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003 Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9 Review-Url: https://codereview.chromium.org/2319293003
* Optimize color xforms when src and dst are matchingGravatar msarett2016-08-15
| | | | | | | | | | | | | | | Useful when: (1) Client does not realize src and dst match (calls color xform anyway). (2) Client wants half floats, src and dst have matching gamuts (3) Client wants premul (done correctly in linear space), src and dst have matching gamuts. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206403003 Review-Url: https://codereview.chromium.org/2206403003
* Perform color correction on png decodesGravatar msarett2016-08-03
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184543003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2184543003
* Fix various SkColorSpace bugsGravatar msarett2016-07-29
| | | | | | | | | | (1) Fixes serialization/deserialization of wacky SkColorSpaces (2) Fix gamma equals checking BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194903002 Review-Url: https://codereview.chromium.org/2194903002
* Add color space xform support to SkJpegCodec (includes F16!)Gravatar msarett2016-07-29
| | | | | | | | | | | | | | | | | Also changes SkColorXform to support: RGBA->RGBA RGBA->BGRA Instead of: RGBA->SkPMColor TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b Review-Url: https://codereview.chromium.org/2174493002
* Revert of Add color space xform support to SkJpegCodec (includes F16!) ↵Gravatar msarett2016-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #9 id:260001 of https://codereview.chromium.org/2174493002/ ) Reason for revert: Breaking MSAN Original issue's description: > Add color space xform support to SkJpegCodec (includes F16!) > > Also changes SkColorXform to support: > RGBA->RGBA > RGBA->BGRA > > Instead of: > RGBA->SkPMColor > > TBR=reed@google.com > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002 > CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b TBR=mtklein@google.com,reed@google.com,herb@google.com,brianosman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2195523002
* Add color space xform support to SkJpegCodec (includes F16!)Gravatar msarett2016-07-28
| | | | | | | | | | | | | | | | Also changes SkColorXform to support: RGBA->RGBA RGBA->BGRA Instead of: RGBA->SkPMColor TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2174493002
* Remove unnecessary getColorSpace() API from SkCodecGravatar msarett2016-07-21
| | | | | | | | | | Not needed since now we can get it from the SkImageInfo. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2170793004 Review-Url: https://codereview.chromium.org/2170793004
* Fix master-skia buildGravatar msarett2016-07-19
| | | | | | | | TBR=djsollen@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159223003 Review-Url: https://codereview.chromium.org/2159223003
* Improve naive SkColorXform to half floatsGravatar msarett2016-07-19
| | | | | | | | | | | | | | | | | | | | | | | | This should give us a good baseline to explore using SkRasterPipeline. A particular colorxform to half float drops from 425us to 282us on my desktop. Color Xform to Half Float (HP z620) Original 425us Trans16 (not 32) 355us Vector Trans16 378us Trans16 + Keep Halfs in Vector 335us Vector Trans16 + Keep Halfs in Vector 282us Final 282us Color Xform to Half Float (Nexus 5X) Original 556us Final 472us BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159993003 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2159993003
* Add capability for SkColorXform to output half floatsGravatar msarett2016-07-15
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147763002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2147763002
* Support sRGB dsts in opt codeGravatar msarett2016-06-20
| | | | | | | | | | | | | | | 201295.jpg on HP z620 (300x280) QCMS Xform 0.418 ms Skia NEW Xform 0.378 ms Vs QCMS 1.11x BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2078623002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2078623002
* Implement fast, correct gamma conversion for color xformsGravatar msarett2016-06-16
| | | | | | | | | | | | | | | | | | | | | | 201295.jpg on HP z620 (300x280, most common form of sRGB profile) QCMS Xform 0.495 ms Skia Old Xform 0.235 ms Skia NEW Xform 0.423 ms Vs Old Code 0.56x Vs QCMS 1.17x So to summarize, we are now much slower than before, but still a bit faster than QCMS. And now we are also far more accurate than QCMS :). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060823003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2060823003
* Optimize color xforms with 2.2 gammas for SSE2Gravatar msarett2016-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we recognize commonly used gamma tables and parameters as 2.2f, about 98% of jpegs with color profiles will pass through this xform (assuming the dst is also 2.2f). Sample size is 10,322 jpegs. I won't go crazy with performance numbers because this is a work in progress, particularly in terms of correctness. 201295.jpg on HP z620 (300x280, most common form of sRGB profile) Decode Time + QCMS Xform 1.28 ms QCMS Xform Only 0.495 ms Decode Time + Skia Opt Xform 1.01 ms Skia Opt Xform Only 0.235 ms Decode Time + Xform Speed-up 1.27x Xform Only Speed-up 2.11x FWIW, Skia xform time before these optimizations was 41.1 ms. But we expected that code to be slow. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046013002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2046013002
* Use SK_TEST_QCMS to mark qcms test codeGravatar msarett2016-06-06
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031053005 Review-Url: https://codereview.chromium.org/2031053005
* Add color correction benchmark - with comparison to qcmsGravatar msarett2016-06-03
--colorImages is empty by default so this won't affect the runtime of the bots. To run locally, use --colorImages <path> and --benchType skcolorcodec. Two takeaways so far: Color correction is (currently) slower than jpeg decodes. Our reference solution is slower than qcms. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035793002 Review-Url: https://codereview.chromium.org/2035793002