aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/readpixels.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>
* move a bunch of helpers from SkImageInfo.h into privGravatar Mike Reed2018-02-09
| | | | | | | | | Bug: skia: Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca Reviewed-on: https://skia-review.googlesource.com/105289 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Cary Clark <caryclark@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>
* 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>
* 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>
* Support numerical transfer functions in readPixels()Gravatar Matt Sarett2017-05-02
| | | | | | | | | | | | | Let's do this because: (1) We can. (2) Android and Chrome have asked for it. (3) It will simplify the implementation of SkImage::makeColorSpace(). Bug: skia: Change-Id: Ia3c322b8a58c79ad67cdebe744e0623bd59dcffd Reviewed-on: https://skia-review.googlesource.com/15148 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* readpixels GM uses GPU image in GPU configsGravatar Brian Osman2017-03-21
| | | | | | | | | | | | This now demonstrates that readPixels does not do color sapce conversion in Ganesh (and fails completely for unpremul F16). Next: fix those issues. BUG=skia:5853 Change-Id: If3bd1882249ae85b4738ef72e16cfb87b06b9363 Reviewed-on: https://skia-review.googlesource.com/9904 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Improvements to readpixels GMGravatar Brian Osman2017-03-20
| | | | | | | | | | | | | | | | | | | We don't support unpremultiplied images. Therefore: - Don't test unpremul source images. - After doing an unpremultiplying read, make sure to premul before drawing For this to work with F16, add support for F16 sources to SkColorSpaceXform. Public API change is comments-only. TBR=reed@google.com BUG=skia: Change-Id: Ie05b58231e99ca88cd7792b65ffbb4f390b01726 Reviewed-on: https://skia-review.googlesource.com/9900 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* Picture backed images must have a bit depth and color spaceGravatar Matt Sarett2017-02-14
| | | | | | | | | | | | | | Enforce that picture backed images created by the public API must have a non-null SkColorSpace. SkPictureShader uses a private call to get around this restriction. BUG=skia: Change-Id: I2fc11a8ffe583035d09e83abf40b827fbf575321 Reviewed-on: https://skia-review.googlesource.com/8415 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | | Reland from: https://skia-review.googlesource.com/c/8021/ BUG=skia: Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a Reviewed-on: https://skia-review.googlesource.com/8136 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "SkColorSpace: remove named API, add gamut API"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | BUG=skia: Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 Reviewed-on: https://skia-review.googlesource.com/8021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Add readPixels() tests for generator backed imagesGravatar Matt Sarett2017-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Good news: Everything seems to work as it is supposed to. That's why this CL is just tests. Bad news: Picture is a bit strange in that the caching behavior may affect how the output looks. Ex: If we choose to cache, we will first draw into the picture's colorSpace and then convert that to the dstColorSpace. If we choose not to cache, we will draw directly into the dstColorSpace. And then untagged pictures seem like they really shouldn't work very well... We are caching a legacy draw and then drawing that into the dstColorSpace? Maybe this isn't the most critical thing to think about right now though, given Florin's work. Remaining TODOs: Color space support for gpu-backed images. I still plan to clarify conversions that are allowed vs. not allowed and share that code between all SkImages. BUG=skia:6021 Change-Id: I9557ca1c00ff6854848fe59c3a67abd2af91bb46 Reviewed-on: https://skia-review.googlesource.com/6853 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix iOS buildGravatar Matt Sarett2016-12-22
| | | | | | | | | BUG=skia: Change-Id: I914cd75c84bbe57401ab65352d4e8b3dc413dce1 Reviewed-on: https://skia-review.googlesource.com/6418 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Improve color space support in SkImage::readPixels()Gravatar Matt Sarett2016-12-22
Correct handling of kGray, k565, k4444 etc. is still a TODO. SkImage_Generator and SkImage_Gpu are still TODOs. BUG=skia:6021 Change-Id: Ib53d97d3a866b2b4934fd85c10100855743a8fab Reviewed-on: https://skia-review.googlesource.com/6396 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>