aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images
Commit message (Collapse)AuthorAge
* when encoding PNG, don't assume F16 values are in rangeGravatar Mike Klein2017-07-21
| | | | | | | | | | | | | | | I believe this will fix this batch of broken colorImages: https://gold.skia.org/search?blame=e23e55ef33358b2f6f98fc9cb795c71397c01618&fdiffmax=-1&fref=false&frgbamax=255&frgbamin=0&head=true&include=false&limit=50&match=gamma_correct&match=name&metric=combined&neg=false&offset=0&pos=false&query=source_type%3DcolorImage&sort=desc&unt=true Depending on the instruction set, clamping to logical [0,1] may be implicit or not as we work our way down to bytes. I think that's why these broken images are not more widespread on the bots. Change-Id: Ie9bb937864bf6954301d76d9921a2d3029d12c9a Reviewed-on: https://skia-review.googlesource.com/25742 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* convert over to 2d-modeGravatar Mike Klein2017-07-20
| | | | | | | | | | | | [√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible [√] convert compile to 2d also, remove 1d run/compile [√] convert all call sites [√] no diffs Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43 Reviewed-on: https://skia-review.googlesource.com/24263 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* guard references to SkColorTableGravatar Mike Reed2017-07-18
| | | | | | | | Bug: skia:6828 Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108 Reviewed-on: https://skia-review.googlesource.com/24260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Index8 is dead, remove guarded codeGravatar Mike Reed2017-07-17
| | | | | | | | | | Needs google3 to be updated before this can land. Bug: skia:6828 Change-Id: I2c16be13c6937ffa48768cc24f9f980171c824d6 Reviewed-on: https://skia-review.googlesource.com/23940 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Guard to remove kIndex_8_SkColorTypeGravatar Mike Reed2017-07-13
| | | | | | | | | Bug: skia:6828 Change-Id: Ia942a36abb18213184f8d436555a658270d97d47 Reviewed-on: https://skia-review.googlesource.com/22721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* clean up low-hanging swap_rbGravatar Mike Klein2017-06-28
| | | | | | | | | | | | | | | There are two remaining swap_rb uses that both look non-trivial to replace: - sampling out of index8 when the color table is bgra - table transforms on bgra inputs in SkColorSpaceXform I don't think it's a big deal to just leave swap_rb around, just a little sad. Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490 Reviewed-on: https://skia-review.googlesource.com/21040 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Always encode images with sRGB encoded pixelsGravatar Matt Sarett2017-06-12
| | | | | | | | | Bug: skia: Change-Id: Icb25bc21a30e88f21df5b0e267d5a3a05535e44a Reviewed-on: https://skia-review.googlesource.com/19544 Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* fix f16 encodingGravatar Mike Klein2017-06-12
| | | | | | | | | | We'll encode F16 .pngs at 16-bit linear, so don't to_srgb them. We'll encode F16 .jpgs and .webps as 8-bit sRGB, so tag them as sRGB. Change-Id: Ibc5b5e2d3aea68cdf1531026cbe8b6191f7e39ea Reviewed-on: https://skia-review.googlesource.com/19498 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add comments support for PNG encoderGravatar Yuqian Li2017-06-09
| | | | | | | | | Bug: skia:6689 Change-Id: I6ccac8890f44724ccd6e20c8f4ea80bc99f9fa58 Reviewed-on: https://skia-review.googlesource.com/19080 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* update SkRasterPipeline::run() to also take yGravatar Mike Klein2017-06-01
| | | | | | | | | y isn't used yet. This is just a warmup that updates the callers. Change-Id: I78f4f44e2b82f72b3a39fa8a8bdadef1d1b8a99e Reviewed-on: https://skia-review.googlesource.com/18381 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkRasterPipeline in SkArenaAllocGravatar Mike Klein2017-05-24
| | | | | | | | | Bug: skia:6673 Change-Id: Ia2bae4f6a9039a007a10b6b45bcf2f0854bf6e5c Reviewed-on: https://skia-review.googlesource.com/17794 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkWebpEncoder: use bgra for lossless and yuv for lossyGravatar Matt Sarett2017-05-19
| | | | | | | | | | Previosuly, we would (accidentally) always use just yuv. Bug: 713862 Change-Id: I00acc6ca2841ba0636494119b7b4f46a9deee401 Reviewed-on: https://skia-review.googlesource.com/17406 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Temporarily use default webp encode method for bzlGravatar Matt Sarett2017-05-19
| | | | | | | | | | I suspect that this will fix the failing golden image tests. Bug: skia: Change-Id: I9f88206ae782e6a04817e72cdfcb3e0c4bdaa293 Reviewed-on: https://skia-review.googlesource.com/17393 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add support for webp lossless compressionGravatar Matt Sarett2017-05-17
| | | | | | | | | Bug: 713862 Change-Id: I8dcc6506338f3c54fb14a78620e7daaadadfedde Reviewed-on: https://skia-review.googlesource.com/17073 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix Ubuntu-Clang-x86_64-Release-MiniGravatar Matt Sarett2017-05-11
| | | | | | | | | | Bug: skia: Change-Id: Iab3dbb007ae67b5d82a727cb1fd5ced6b10b325a Reviewed-on: https://skia-review.googlesource.com/16605 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add SkJpegEncoder and SkWebpEncoder to public APIGravatar Matt Sarett2017-05-11
| | | | | | | | | Bug: 713862 Change-Id: I05d8b3a506f817d63b0bc3ab3f9233e24bbe3be0 Reviewed-on: https://skia-review.googlesource.com/16233 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Add downsampling option to SkJpegEncoderGravatar Matt Sarett2017-05-09
| | | | | | | | Bug: 713862 Change-Id: Ibad6ecf836ccfd355499e1bace7bcd4ba772a97a Reviewed-on: https://skia-review.googlesource.com/15891 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add jpeg encoder alpha handling optionGravatar Matt Sarett2017-05-09
| | | | | | | | | | | | | | | | | This instructs us on how to encode jpegs when the src image has alpha. The original behavior is to ignore the alpha channel. This CL adds the option to blend the pixels onto opaque black. Note that kBlendOnBlack and kIgnore are identical unless the input alpha type is kUnpremul. Bug: 713862 Bug: skia:1501 Change-Id: I4891c70bb0ccd83f7974c359bd40a2143b5c49ac Reviewed-on: https://skia-review.googlesource.com/15817 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Move SkPngEncoder into public APIGravatar Matt Sarett2017-05-09
| | | | | | | | | | Bug: 713862 Change-Id: I45068ed39affe41ffe0f29bf42c5ea1d9b0247ba Reviewed-on: https://skia-review.googlesource.com/15897 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add filtering and zlib-level options to SkPngEncoderGravatar Matt Sarett2017-05-08
| | | | | | | | | | Bug: skia:6409 Bug: 713862 Change-Id: If287e2bcad5af990fac11e9091305f45ec903dbf Reviewed-on: https://skia-review.googlesource.com/15647 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Stub encoding impls for clients without librariesGravatar Matt Sarett2017-05-05
| | | | | | | | Bug: skia: Change-Id: I447b071e50182a569af828dc7f62bf78f47f834d Reviewed-on: https://skia-review.googlesource.com/15644 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkEncoder: Rename files, change webp API, for consistencyGravatar Matt Sarett2017-05-05
| | | | | | | | Bug: skia: Change-Id: I3dd6feb3d5661dcad3d2388b4d01fa9d3bbb15bb Reviewed-on: https://skia-review.googlesource.com/15631 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for row-by-row png encodesGravatar Matt Sarett2017-05-05
| | | | | | | | | | Also adds a SkEncoder base class. Bug: 713862 Change-Id: Ia3f009cd9f376514f6c19396245fab3a43ae6536 Reviewed-on: https://skia-review.googlesource.com/15152 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | | | | Reland of: https://skia-review.googlesource.com/c/14641/ Bug: 713862 Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e Reviewed-on: https://skia-review.googlesource.com/15144 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for row-by-row jpeg encoding"Gravatar Leon Scroggins2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9b848d5749c5e34b56f927a3a3374c8ebafbd9db. Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue. [1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1 [2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper Original change's description: > Add support for row-by-row jpeg encoding > > Bug: 713862 > Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 > Reviewed-on: https://skia-review.googlesource.com/14641 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > TBR=msarett@google.com,scroggo@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d Reviewed-on: https://skia-review.googlesource.com/15140 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Add support for row-by-row jpeg encodingGravatar Matt Sarett2017-05-02
| | | | | | | | Bug: 713862 Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1 Reviewed-on: https://skia-review.googlesource.com/14641 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Manual revert: Add support for writing ICC profiles to webp encoder"Gravatar Matt Sarett2017-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4293a1e5f259cf12560d6e794c1a05ad4dbc0b32. Reason for revert: Relanding, libwebp updated in Android master Original change's description: > Manual revert: Add support for writing ICC profiles to webp encoder > > Bug: skia: > Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721 > Reviewed-on: https://skia-review.googlesource.com/11444 > Reviewed-by: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I73aa9e8183241ada4ec6451567bce3d3d18995cc Reviewed-on: https://skia-review.googlesource.com/11523 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Manual revert: Add support for writing ICC profiles to webp encoderGravatar Matt Sarett2017-04-06
| | | | | | | | | Bug: skia: Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721 Reviewed-on: https://skia-review.googlesource.com/11444 Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkImageEncoder: Be more lenient on inputsGravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | | | | | | | | (1) Some clients want us to write ICC profiles, even though they have not opted into linear unpremultiplication. This CL allows that behavior. (2) We should not assert that the transfer function must be linear or srgb. Particularly in non-linear blending modes, skia is willing to support a larger set of transfer functions. (3) We still need to require linear or srgb when in kRespect transfer function mode. We have not yet implemented linear unpremultiplies for arbitrary transfer functions. Bug: skia: Change-Id: Idce9f07c3d36eca4d78ede5e2650b2cab412904c Reviewed-on: https://skia-review.googlesource.com/11349 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Revert "Revert "Add support for writing ICC profiles to webp encoder""Gravatar Matt Sarett2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e87d7781db75a7ec22a103eda0886c2ca8dc4d9d. Reason for revert: Not the cause of the crashes. Original change's description: > Revert "Add support for writing ICC profiles to webp encoder" > > This reverts commit 0c9d0b4e03b6c10778329e995b5dfdcb97954b28. > > Reason for revert: Looks like it's breaking a number of bots. > > Original change's description: > > Add support for writing ICC profiles to webp encoder > > > > Bug: skia: > > Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab > > Reviewed-on: https://skia-review.googlesource.com/10212 > > Commit-Queue: Matt Sarett <msarett@google.com> > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > > > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb > Reviewed-on: https://skia-review.googlesource.com/11408 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=jvanverth@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I42f6ddefaf87c87b155640950b52a456952130ec Reviewed-on: https://skia-review.googlesource.com/11410 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for writing ICC profiles to webp encoder"Gravatar Jim Van Verth2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0c9d0b4e03b6c10778329e995b5dfdcb97954b28. Reason for revert: Looks like it's breaking a number of bots. Original change's description: > Add support for writing ICC profiles to webp encoder > > Bug: skia: > Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab > Reviewed-on: https://skia-review.googlesource.com/10212 > Commit-Queue: Matt Sarett <msarett@google.com> > Reviewed-by: Leon Scroggins <scroggo@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb Reviewed-on: https://skia-review.googlesource.com/11408 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add support for writing ICC profiles to webp encoderGravatar Matt Sarett2017-04-05
| | | | | | | | Bug: skia: Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab Reviewed-on: https://skia-review.googlesource.com/10212 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@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>
* Revert "Revert "Add support for writing icc profiles to the jpeg encoder""Gravatar Matt Sarett2017-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dda14b9b7ac13dba9214f484fc6270b3ccf4b68b. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Add support for writing icc profiles to the jpeg encoder" > > This reverts commit 4ef01482025e2e629e35458aa214436d3b4138e8. > > Reason for revert: This breaks the android autoroller. > > Original change's description: > > Add support for writing icc profiles to the jpeg encoder > > > > Also, share the impl for skjpeg_error_mgr between the > > jpeg decoder and encoder. They are already identical > > anyway. > > > > BUG=skia: > > > > Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb > > Reviewed-on: https://skia-review.googlesource.com/10011 > > Reviewed-by: Leon Scroggins <scroggo@google.com> > > Commit-Queue: Matt Sarett <msarett@google.com> > > > > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: Idbb9918370e8384e39d6b7d1c3bcd9545ce4cfd1 > Reviewed-on: https://skia-review.googlesource.com/10017 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Derek Sollenberger <djsollen@google.com> > TBR=djsollen@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I9c1df3f497a9187ac017e464976fd8f0333bad0e Reviewed-on: https://skia-review.googlesource.com/10030 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for writing icc profiles to the jpeg encoder"Gravatar Derek Sollenberger2017-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4ef01482025e2e629e35458aa214436d3b4138e8. Reason for revert: This breaks the android autoroller. Original change's description: > Add support for writing icc profiles to the jpeg encoder > > Also, share the impl for skjpeg_error_mgr between the > jpeg decoder and encoder. They are already identical > anyway. > > BUG=skia: > > Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb > Reviewed-on: https://skia-review.googlesource.com/10011 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Idbb9918370e8384e39d6b7d1c3bcd9545ce4cfd1 Reviewed-on: https://skia-review.googlesource.com/10017 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add support for writing icc profiles to the jpeg encoderGravatar Matt Sarett2017-03-22
| | | | | | | | | | | | | Also, share the impl for skjpeg_error_mgr between the jpeg decoder and encoder. They are already identical anyway. BUG=skia: Change-Id: I4d67f28126388fef3057d62b6e0b203e21ed4afb Reviewed-on: https://skia-review.googlesource.com/10011 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "Add support for writing icc profiles to the jpeg encoder"Gravatar Derek Sollenberger2017-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3b95ce468c73af8247ba9582a7b84548b19f06a. Reason for revert: This is breaking the Android auto roller. Original change's description: > Add support for writing icc profiles to the jpeg encoder > > Also, share the impl for skjpeg_error_mgr between the > jpeg decoder and encoder. They are already identical > anyway. > > BUG=skia: > > Change-Id: I029312406dee8734744cc3058acd1f153aefcd83 > Reviewed-on: https://skia-review.googlesource.com/9971 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,scroggo@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I05fb02610dbf4d9475f158d876d6495b0f7e9db4 Reviewed-on: https://skia-review.googlesource.com/10009 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add support for writing icc profiles to the jpeg encoderGravatar Matt Sarett2017-03-22
| | | | | | | | | | | | | Also, share the impl for skjpeg_error_mgr between the jpeg decoder and encoder. They are already identical anyway. BUG=skia: Change-Id: I029312406dee8734744cc3058acd1f153aefcd83 Reviewed-on: https://skia-review.googlesource.com/9971 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* More png API compatibilityGravatar Matt Sarett2017-03-21
| | | | | | | | | BUG=skia: Change-Id: I71aa730b08b3eebd18d9651363bbcd816b8598fd Reviewed-on: https://skia-review.googlesource.com/9976 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Compatible use of png_set_iCCPGravatar Matt Sarett2017-03-21
| | | | | | | | | BUG=skia: Change-Id: Ie37b92fd5e0d2bc92ec7f2bf3e6f56d061bc30a2 Reviewed-on: https://skia-review.googlesource.com/9960 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Add support for writing ICC profiles in png encodesGravatar Matt Sarett2017-03-21
| | | | | | | | | BUG=skia: Change-Id: I99eb2f157f249ed09d724461ec4a1e31db70816a Reviewed-on: https://skia-review.googlesource.com/9782 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Make header files idempotent; script to checkGravatar Hal Canary2017-02-13
| | | | | | | Change-Id: I960ded854e6bc7cdee029a7393cac2a686c41754 Reviewed-on: https://skia-review.googlesource.com/8308 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Refactor pixel conversion: premul and unpremulGravatar Matt Sarett2017-02-09
| | | | | | | | | | | Just going for simpler and more code sharing. BUG=skia: Change-Id: I84c20cd4dbb6950f7b4d0bc659c4b3b5a2af201c Reviewed-on: https://skia-review.googlesource.com/8287 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Update SkJPEGImageEncoderGravatar Matt Sarett2017-01-28
| | | | | | | | | | | | | | (1) Use libjpeg-turbo color space extensions when possible. (2) Use transform_scanline_procs when pre-libjpeg-turbo transformation are required. (3) Add support for Gray and F16. BUG=skia: Change-Id: I77b977cb8c9e0afc17d907dd73a1cf3f16539bcc Reviewed-on: https://skia-review.googlesource.com/7642 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Delete SkAutoTime from jpeg encoderGravatar Matt Sarett2017-01-26
| | | | | | | | | | | We use nanobench instead to measure encode performance. BUG=skia: Change-Id: I4f0b43b7e09f99967889e941cb6947433033006a Reviewed-on: https://skia-review.googlesource.com/7640 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Add F16 and gamma correct support to webp encoderGravatar Matt Sarett2017-01-24
| | | | | | | | | BUG=skia: Change-Id: Ib788466fa1e2bed26e7ffd8f03bee42930eae1d6 Reviewed-on: https://skia-review.googlesource.com/7425 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Move shader register setup to SkRasterPipelineBlitter.Gravatar Mike Klein2017-01-23
| | | | | | | | | | | | | | | | | | | | | We've been seeding the initial values of our registers to x+0.5,y+0.5, 1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines. This CL changes that to do so only when blitting, and only when we have a shader. The nicest part of this change is that SkRasterPipeline itself no longer needs to have a concept of y, or what x means. It just marches x through [x,x+n), and the blitter handles y and layers the meaning of "dst x coordinate" onto x. This ought to make SkSplicer a little easier to work with too. dm --src gm --config f16 srgb 565 all draws the same. Change-Id: I69d8c1cc14a06e5dfdd6a7493364f43a18f8dec5 Reviewed-on: https://skia-review.googlesource.com/7353 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make SkWEBPImageEncoder use transform_scanline_procsGravatar Matt Sarett2017-01-23
| | | | | | | | | | | | This refactor will make it simple to add F16 and GammaCorrect support to the webp encoder. BUG=skia: Change-Id: I379ba2ff0b44d865847877322e86d0c138e727c8 Reviewed-on: https://skia-review.googlesource.com/7356 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add F16 support to SkPNGImageEncoderGravatar Matt Sarett2017-01-19
| | | | | | | | | | | | BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ifd221365a7b9f9a4a4fc5382621e0da7189e1148 Reviewed-on: https://skia-review.googlesource.com/6526 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Respect SkColorSpace in SkPNGImageEncoderGravatar Matt Sarett2017-01-10
| | | | | | | | | | | | | | | | | | | | | | | This only changes behavior when the input SkBitmap/SkPixmap is tagged with a non-null SkColorSpace. Android tags their bitmaps as sRGB when linear blending is enabled. So this only changes behavior in Android when linear blending is turned on. *If linear blending is turned on, this will do a color correct encode (which is the desired behavior). *If linear blending is turned off, this will do a legacy encode. TODO: Add support for F16. TODO: Add color space support to WEBP. TODO: Tag encoded images with ICC profiles (when it makes sense). BUG=skia: Change-Id: Idd8a2836371d24a453d953e6fe2e76a87751be96 Reviewed-on: https://skia-review.googlesource.com/6498 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>