aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SRGBTest.cpp
Commit message (Collapse)AuthorAge
* Revert "update SkColor4f::FromColor() to preserve transfer function"Gravatar Robert Phillips2018-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9e229233a67b36a508d3c753a5b93a022369c5f7. Reason for revert: See if blocking Android roll Original change's description: > update SkColor4f::FromColor() to preserve transfer function > > This kills off some sRGB tables, > and lots of call sites can now use SkColor4f::FromColor(). > > It doesn't seem important to keep this test. > > Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb > Reviewed-on: https://skia-review.googlesource.com/141046 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I9d76e4ccf8a101853a7404abb33bdab9e0c64c25 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/141181 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* update SkColor4f::FromColor() to preserve transfer functionGravatar Mike Klein2018-07-12
| | | | | | | | | | | | This kills off some sRGB tables, and lots of call sites can now use SkColor4f::FromColor(). It doesn't seem important to keep this test. Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb Reviewed-on: https://skia-review.googlesource.com/141046 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* remove append_from_srgb()Gravatar Mike Klein2017-12-18
| | | | | | | | | | | It's now no different than append(from_srgb). Bug: skia:7419 Change-Id: I97c59b6987f033ec2f1859db40ca3056b87b370a Reviewed-on: https://skia-review.googlesource.com/86741 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* funnel all constant colors through append_constant_color()Gravatar Mike Klein2017-08-03
| | | | | | | | | | | | | | | | My next step is to change the uniform_color context to struct { float r,g,b,a; uint32_t rgba; }; so that it's trivial to load in both float and 8-bit pipelines. Change-Id: If9bdde353ced3bf9eb0c63204b4770ed614ad16b Reviewed-on: https://skia-review.googlesource.com/30481 Reviewed-by: Florin Malita <fmalita@chromium.org> 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>
* add stages for black and white colorsGravatar Mike Reed2017-07-06
| | | | | | | | | | | | | | histogram of test skps: black: 1/7 white: 2/7 other: 4/7 Bug: skia: Change-Id: I3a092899d31ce87837e66e5c8ea9ec5e0f239361 Reviewed-on: https://skia-review.googlesource.com/21408 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Reed <reed@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>
* make sure to_srgb maps 1 to 1Gravatar Mike Klein2017-05-25
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android BUG=skia:6678,skia:6683 Change-Id: I217084fa0a11ad661a8751f0c3b1cade5cc52473 Reviewed-on: https://skia-review.googlesource.com/17902 Reviewed-by: Herb Derby <herb@google.com> 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>
* add a test that sRGB stages round tripGravatar Mike Klein2017-05-15
| | | | | | | Change-Id: Ide8303f6fc162f3703f7db298fe210d47225a580 Reviewed-on: https://skia-review.googlesource.com/16988 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Test sk_linear_to_srgb() less exhaustively in Debug mode.Gravatar mtklein2016-08-08
| | | | | | | | | | It's pretty slow when not optimized... it can take ~5 minutes to run. This makes it take ~2 seconds on my laptop. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221803002 Review-Url: https://codereview.chromium.org/2221803002
* Tune linear->sRGB constants to round-trip all bytes.Gravatar mtklein2016-07-20
| | | | | | | | | | | | I basically just ran a big 5-deep for-loop over the five constants here. This is the first set of coefficients I found that round trips all bytes. I suspect there are many such sets. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162063003 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/2162063003
* Update rounding/clamping comments on sk_linear_to_srgb().Gravatar mtklein2016-07-19
| | | | | | | | | Rounding is enough. No need for an explicit clamp if the inputs are in range. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161223002 Review-Url: https://codereview.chromium.org/2161223002
* Move sRGB <-> linear conversion components to their own files.Gravatar mtklein2016-07-08
| | | | | | | | | | | | | | | This makes them a little easier to use outside SkColorXform code. I've added some notes about how best to use them and their eccentricities, and added a test. Ultimately any software sRGB <-> linear conversion should funnel somehow through here. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128893002 CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot;client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/45e58c8807179638980aae8503573b950b844e4c Review-Url: https://codereview.chromium.org/2128893002
* Revert of Move sRGB <-> linear conversion components to their own files. ↵Gravatar mtklein2016-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #5 id:80001 of https://codereview.chromium.org/2128893002/ ) Reason for revert: Monotonicity assert is failing on ARM. (Different rsqrt() and invert() precision?) Will investigate a bit tomorrow... might reland with the test TODO. Original issue's description: > Move sRGB <-> linear conversion components to their own files. > > This makes them a little easier to use outside SkColorXform code. > > I've added some notes about how best to use them and their eccentricities, and added a test. > > Ultimately any software sRGB <-> linear conversion should funnel somehow through here. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128893002 > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/45e58c8807179638980aae8503573b950b844e4c TBR=reed@google.com,msarett@google.com,mtklein@chromium.org # 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/2131793002
* Move sRGB <-> linear conversion components to their own files.Gravatar mtklein2016-07-07
This makes them a little easier to use outside SkColorXform code. I've added some notes about how best to use them and their eccentricities, and added a test. Ultimately any software sRGB <-> linear conversion should funnel somehow through here. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2128893002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2128893002