aboutsummaryrefslogtreecommitdiff
path: root/gn/tests.gni
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2018-08-22 11:18:08 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-08-22 18:16:20 +0000
commit81886e8f9461c7049751c6a2c194a1df632dd362 (patch)
tree2411fa6b5f1ec9aaa28d774f37190b03ac96c231 /gn/tests.gni
parent82cf64a0d3177b6f11ef820edb4f53f63ef3493b (diff)
downloadskqp-81886e8f9461c7049751c6a2c194a1df632dd362.tar.gz
Switch SkCodec to use skcms
Bug: skia:6839 Bug: skia:8052 Create an skcms_Profile instead of an SkColorSpace when creating an SkCodec. Eventually we'll move the SkImageInfo (and its SkColorSpace) entirely to clients (e.g. SkAndroidCodec, SkCodecImageGenerator), but for now, create it with SkEncodedInfo::makeImageInfo. Create new SkEncodedInfo::Colors for the special PNG cases that we want to map to specific SkColorTypes. SkEncodedInfo: - Add ICCProfile, which owns an skcms_ICCProfile - FIXME: maybe we should have a single instance for SRGB like SkColorSpace? - Add kXAlpha_Color, for kAlpha_8. Since I'm not longer creating an SkImageInfo (at least in SkPngCodec), it needs a way to pass this info to the caller. - Add k565_Color, for the same reason. Matt originally had this in https://codereview.chromium.org/2212563003/#ps120001, but didn't land that version. I like it though. Mike didn't like the bits per component for 565, but it seems like a sensible hack, much like the existing one for kAlpha_8 - Add width and height. These were removed for redundancy with SkImageInfo, but it makes sense to have them here without it. BUILD.gn: - Build the new SkEncodedInfo.cpp SkCodec: - Remove the constructor with an SkImageInfo. Edit the other one to drop width and height (now in SkEncodedInfo) and take a RHS reference to SkEncodedInfo - Create the SkImageInfo from fEncodedInfo (for now) - Consolidate choosing skcms_AlphaFormat for Transform here - Call conversionSupported from initializeColorXform, with a new parameter for whether there is a color Xform, allowing SkJpegCodec and SkHeifCodec to override that method instead of having another method. SkBmpCodec (etc) - Adapt to the changes above - Create a new SkEncodedInfo w/o profile for the swizzler. SkPngCodec: - use the new SkEncodedInfo::Colors rather than a custom SkImageInfo SkRawCodec: - Remove SkEncodedInfo from SkDngImage, which doesn't actually need it. This is helpful since we don't know all the info yet. - Rewrite gAdobeRGB_toXYZD50 as an skcms_Matrix3x3 SkWebpCodec: - Remove premul_step computation, and simplify to just rely on the base class' handling of applying the transform. SkSwizzler: - Add cases for the new SkEncodedInfo::Colors TBR=reed@google.com No public API changes. Only private/public members of SkCodec.h are modified. Change-Id: Ic0d3bb752b03f13be886b80331987aa5a5713fc0 Reviewed-on: https://skia-review.googlesource.com/136062 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'gn/tests.gni')
-rw-r--r--gn/tests.gni1
1 files changed, 1 insertions, 0 deletions
diff --git a/gn/tests.gni b/gn/tests.gni
index 97315143ed..e829c70738 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -64,6 +64,7 @@ tests_sources = [
"$_tests/EGLImageTest.cpp",
"$_tests/EmptyPathTest.cpp",
"$_tests/EncodeTest.cpp",
+ "$_tests/EncodedInfoTest.cpp",
"$_tests/ExifTest.cpp",
"$_tests/F16StagesTest.cpp",
"$_tests/FillPathTest.cpp",