New gamut GM, to test gamut conversion in various code-paths
authorbrianosman <brianosman@google.com>
Wed, 7 Sep 2016 14:04:44 +0000 (07:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 7 Sep 2016 14:04:45 +0000 (07:04 -0700)
commit2c4b64e92a3e589764336a91e06cebaa35ba5eb0
treea2e249a8e9dfbfb98319f2361497fbb963cf0b7d
parente050555bf32b472da12603350ae81730555c650d
New gamut GM, to test gamut conversion in various code-paths

After several different strategies, this one appears to work
well. The basic test:

1) For a variety of drawing techniques, we render fixed size
   rectangles. (Solid colors via paint color, bitmap, etc...)
2) For each method in #1, we render to both an sRGB and
   WideGamutRGB offscreen surface. (AdobeRGB isn't wide enough
   to clearly demonstrate if things are working or not).
3) Use readPixels to fetch the raw (still in wide gamut) pixel
   data, then draw that directly to the final canvas.

So, for each pair of squares, they should look clearly
different. Currently, with the GPU backend, only the bicubic
bitmap paths have that behavior. Adding more test cases (and
fixing the ones that are already incorrect) will be the long
tail of gamut transformation.

Current output (with my other patchset, which fixes all
bitmap draws): https://screenshot.googleplex.com/wsL3x7eCtWE.png

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293173002

Review-Url: https://codereview.chromium.org/2293173002
35 files changed:
gm/gamut.cpp [new file with mode: 0644]
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Release.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Release.json
infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN.json
infra/bots/recipes/swarm_test.expected/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind.json
infra/bots/recipes/swarm_test.expected/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan.json
infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot.json
infra/bots/recipes/swarm_test.expected/Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE.json
infra/bots/recipes/swarm_test.expected/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug.json
infra/bots/recipes/swarm_test.expected/adb_in_path.json
infra/bots/recipes/swarm_test.expected/big_issue_number.json
infra/bots/recipes/swarm_test.expected/download_and_push_skimage.json
infra/bots/recipes/swarm_test.expected/download_and_push_skps.json
infra/bots/recipes/swarm_test.expected/download_and_push_svgs.json
infra/bots/recipes/swarm_test.expected/failed_dm.json
infra/bots/recipes/swarm_test.expected/failed_get_hashes.json
infra/bots/recipes/swarm_test.expected/missing_SKP_VERSION_device.json
infra/bots/recipes/swarm_test.expected/missing_SK_IMAGE_VERSION_device.json
infra/bots/recipes/swarm_test.expected/missing_SVG_VERSION_device.json
infra/bots/recipes/swarm_test.expected/recipe_with_gerrit_patch.json
infra/bots/recipes/swarm_test.py