diff options
author | 2018-07-17 16:45:40 -0400 | |
---|---|---|
committer | 2018-07-18 17:13:46 +0000 | |
commit | 9889c24ec62b7a9fe29df65853ee804fc1b84625 (patch) | |
tree | 4c9007064dc72dc43f52374a9d812778a13e10f2 /tools/skdiff/skdiff_utils.h | |
parent | 66dac70719096b67cb292e0352ea9e8fa94334a4 (diff) |
Add color space logic to skdiff
By default, decode images to a common color space (sRGB) before comparing.
This lets us compare images rendered to different gamuts (eg sRGB or P3),
where the raw pixel values are wildly different, even though the colors
being described are actually the same (or very similar).
Add a "--nocolorspace" option to get the existing behavior of comparing
the raw pixel values.
Also removed the source code for skimagediff, which hasn't been built in
a long time.
Change-Id: Ic55724b523348421bf21e9764d155730b94fc40a
Reviewed-on: https://skia-review.googlesource.com/141962
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tools/skdiff/skdiff_utils.h')
-rw-r--r-- | tools/skdiff/skdiff_utils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/skdiff/skdiff_utils.h b/tools/skdiff/skdiff_utils.h index c799325e36..f041f3a9b8 100644 --- a/tools/skdiff/skdiff_utils.h +++ b/tools/skdiff/skdiff_utils.h @@ -25,7 +25,8 @@ bool are_buffers_equal(SkData* skdata1, SkData* skdata2); sk_sp<SkData> read_file(const char* file_path); /** Decodes the fileBits into the resource.fBitmap. Returns false on failure. */ -bool get_bitmap(sk_sp<SkData> fileBits, DiffResource& resource, bool sizeOnly); +bool get_bitmap(sk_sp<SkData> fileBits, DiffResource& resource, bool sizeOnly, + bool ignoreColorSpace); /** Writes the bitmap as a PNG to the path specified. */ bool write_bitmap(const SkString& path, const SkBitmap& bitmap); |