Obsolete
Status Update
Comments
sc...@google.com <sc...@google.com>
bu...@chromium.org <bu...@chromium.org> #2
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/a7cc48be54c6a92502ba6466cf6cf6e00542e616
commit a7cc48be54c6a92502ba6466cf6cf6e00542e616
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 18 19:27:11 2017
Add SK_LEGACY_FRAME_INFO_ALPHA_TYPE for Skia API change
Needed temporarily to landhttps://skia-review.googlesource.com/35880 in
Skia.
Also replace my @google address with @chromium. I don't see a way to
access Chromium's PolyGerrit with @google
Bug: skia:5609
Bug: skia:6839
NOTRY=true
Change-Id: Ife9545f4a711697f520ea8e90b91c52af77551d5
Reviewed-on:https://chromium-review.googlesource.com/620947
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495646}
[modify]https://crrev.com/a7cc48be54c6a92502ba6466cf6cf6e00542e616/skia/OWNERS
[modify]https://crrev.com/a7cc48be54c6a92502ba6466cf6cf6e00542e616/skia/config/SkUserConfig.h
commit a7cc48be54c6a92502ba6466cf6cf6e00542e616
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 18 19:27:11 2017
Add SK_LEGACY_FRAME_INFO_ALPHA_TYPE for Skia API change
Needed temporarily to land
Skia.
Also replace my @google address with @chromium. I don't see a way to
access Chromium's PolyGerrit with @google
Bug: skia:5609
Bug: skia:6839
NOTRY=true
Change-Id: Ife9545f4a711697f520ea8e90b91c52af77551d5
Reviewed-on:
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495646}
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #3
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/ae79f32e79e39d399d9e3ecdaf9e0fc360928989
commit ae79f32e79e39d399d9e3ecdaf9e0fc360928989
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 18 19:46:59 2017
Call initializeColorXform inside SkCodec
Make initializeColorXform private, and only call in the base class.
Add virtual method to skip initializeColorXform, for classes that do
not need one.
Change SkCodec::FrameInfo's SkAlphaType to an SkEncodedInfo::Alpha.
This allows proper checking internally whether SkCodec needs to do a
color correct premultiply.
Depends onhttps://chromium-review.googlesource.com/c/620947 , for this
API change.
(Separated fromreview.skia.org/25746 )
Bug: skia:5609
Bug: skia:6839
Change-Id: Icb0d46659c546060c34d32eaf792c86708726c7a
Reviewed-on:https://skia-review.googlesource.com/35880
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkIcoCodec.h
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/include/codec/SkCodec.h
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkCodecPriv.h
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/tests/CodecAnimTest.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkPngCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/ae79f32e79e39d399d9e3ecdaf9e0fc360928989/src/codec/SkJpegCodec.cpp
commit ae79f32e79e39d399d9e3ecdaf9e0fc360928989
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 18 19:46:59 2017
Call initializeColorXform inside SkCodec
Make initializeColorXform private, and only call in the base class.
Add virtual method to skip initializeColorXform, for classes that do
not need one.
Change SkCodec::FrameInfo's SkAlphaType to an SkEncodedInfo::Alpha.
This allows proper checking internally whether SkCodec needs to do a
color correct premultiply.
Depends on
API change.
(Separated from
Bug: skia:5609
Bug: skia:6839
Change-Id: Icb0d46659c546060c34d32eaf792c86708726c7a
Reviewed-on:
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #4
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/e9c03e053c607eff10e36fa4f7a09ea003a0b6a8
commit e9c03e053c607eff10e36fa4f7a09ea003a0b6a8
Author: Leon Scroggins III <scroggo@google.com>
Date: Thu Aug 24 15:32:56 2017
Remove SK_LEGACY_FRAME_INFO_ALPHA_TYPE
Update to the new SkCodec API and remove the flag.
Bug: skia:6839
Change-Id: I320539d47d1d99b10d6b8c4791f8248ac16c645d
Reviewed-on:https://chromium-review.googlesource.com/621815
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497060}
[modify]https://crrev.com/e9c03e053c607eff10e36fa4f7a09ea003a0b6a8/skia/config/SkUserConfig.h
[modify]https://crrev.com/e9c03e053c607eff10e36fa4f7a09ea003a0b6a8/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp
commit e9c03e053c607eff10e36fa4f7a09ea003a0b6a8
Author: Leon Scroggins III <scroggo@google.com>
Date: Thu Aug 24 15:32:56 2017
Remove SK_LEGACY_FRAME_INFO_ALPHA_TYPE
Update to the new SkCodec API and remove the flag.
Bug: skia:6839
Change-Id: I320539d47d1d99b10d6b8c4791f8248ac16c645d
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497060}
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #5
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/de7f91b29fd8548e0ab56c80a34a75b7a2c729d6
commit de7f91b29fd8548e0ab56c80a34a75b7a2c729d6
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Sep 01 20:18:49 2017
Remove SK_LEGACY_FRAME_INFO_ALPHA_TYPE
Withhttps://chromium-review.googlesource.com/c/621815 , Chromium no
longer references this. Delete it.
TBR=reed@google.com
Bug: skia:6839
Change-Id: Icd3d394858859e6732b1429394c7c04bb22b9dea
Reviewed-on:https://skia-review.googlesource.com/36581
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/de7f91b29fd8548e0ab56c80a34a75b7a2c729d6/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/de7f91b29fd8548e0ab56c80a34a75b7a2c729d6/include/codec/SkCodec.h
[modify]https://crrev.com/de7f91b29fd8548e0ab56c80a34a75b7a2c729d6/src/codec/SkWebpCodec.cpp
commit de7f91b29fd8548e0ab56c80a34a75b7a2c729d6
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Sep 01 20:18:49 2017
Remove SK_LEGACY_FRAME_INFO_ALPHA_TYPE
With
longer references this. Delete it.
TBR=reed@google.com
Bug: skia:6839
Change-Id: Icd3d394858859e6732b1429394c7c04bb22b9dea
Reviewed-on:
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #6
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/c6f7a4ffa9522159efc42f7c948bba5e66bb8844
commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844
Author: Leon Scroggins III <scroggo@google.com>
Date: Tue Dec 05 00:52:42 2017
Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839
This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).
Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.
The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, use it to make the same decision that Android
would have made - 16 bits per component means to set the info to F16. Add
a test that computeOutputColorType behaves as expected.
Switch conversionSupported to use an SkColorType, which is enough info.
Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.
SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.
Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
Reviewed-on:https://skia-review.googlesource.com/79260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkIcoCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkHeifCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/third_party/gif/SkGifImageReader.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/gn/tests.gni
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkFrameHolder.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/include/codec/SkCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkWbmpCodec.cpp
[rename]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/include/private/SkEncodedInfo.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/dm/DM.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkAndroidCodec.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkJpegCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/include/codec/SkAndroidCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkWebpCodec.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkCodec.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/src/codec/SkGifCodec.cpp
[add]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/tests/CodecRecommendedTypeTest.cpp
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/third_party/gif/SkGifImageReader.h
[modify]https://crrev.com/c6f7a4ffa9522159efc42f7c948bba5e66bb8844/tests/CodecAnimTest.cpp
commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844
Author: Leon Scroggins III <scroggo@google.com>
Date: Tue Dec 05 00:52:42 2017
Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839
This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).
Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.
The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, use it to make the same decision that Android
would have made - 16 bits per component means to set the info to F16. Add
a test that computeOutputColorType behaves as expected.
Switch conversionSupported to use an SkColorType, which is enough info.
Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.
SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.
Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
Reviewed-on:
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[rename]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #7
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/1793e7bb46c1f9d430c1a699a1c3d3168159b659
commit 1793e7bb46c1f9d430c1a699a1c3d3168159b659
Author: Leon Scroggins <scroggo@google.com>
Date: Tue Dec 05 15:38:22 2017
Revert "Hide SkEncodedInfo"
This reverts commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844.
Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16.
- an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor.
- When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine.
Original change's description:
commit 1793e7bb46c1f9d430c1a699a1c3d3168159b659
Author: Leon Scroggins <scroggo@google.com>
Date: Tue Dec 05 15:38:22 2017
Revert "Hide SkEncodedInfo"
This reverts commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844.
Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16.
- an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor.
- When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine.
Original change's description:
TBR=mtklein@chromium.org,scroggo@google.com,reed@google.com
Change-Id: I0c5dd1461e1b70d1e55349a8e7ee6b029c3f556e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7353, skia:6839
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[rename]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #8
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/c8037dc5edda42cacd839df4e1c7d8cfd0953309
commit c8037dc5edda42cacd839df4e1c7d8cfd0953309
Author: Leon Scroggins III <scroggo@google.com>
Date: Tue Dec 05 19:28:08 2017
Reland "Hide SkEncodedInfo"
This partially reverts commit
1793e7bb46c1f9d430c1a699a1c3d3168159b659.
Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839
This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).
Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.
The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, make SkAndroidCodec a friend so it can
access the SkEncodedInfo. A future change will change SkCodec to
recommend F16 for bitsPerComponent > 8, but that will be more involved;
it was the reason for the revert of this CL.
Switch conversionSupported to use an SkColorType, which is enough info.
Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.
SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.
TBR=mtklein@chromium.org,reed@google.com
Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee
Reviewed-on:https://skia-review.googlesource.com/80860
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkIcoCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkHeifCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/third_party/gif/SkGifImageReader.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/gn/tests.gni
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkFrameHolder.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/include/codec/SkCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkWbmpCodec.cpp
[rename]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/include/private/SkEncodedInfo.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/dm/DM.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkAndroidCodec.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkJpegCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/include/codec/SkAndroidCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkWebpCodec.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkCodec.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/src/codec/SkGifCodec.cpp
[add]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/tests/CodecRecommendedTypeTest.cpp
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/third_party/gif/SkGifImageReader.h
[modify]https://crrev.com/c8037dc5edda42cacd839df4e1c7d8cfd0953309/tests/CodecAnimTest.cpp
commit c8037dc5edda42cacd839df4e1c7d8cfd0953309
Author: Leon Scroggins III <scroggo@google.com>
Date: Tue Dec 05 19:28:08 2017
Reland "Hide SkEncodedInfo"
This partially reverts commit
1793e7bb46c1f9d430c1a699a1c3d3168159b659.
Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839
This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).
Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.
The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, make SkAndroidCodec a friend so it can
access the SkEncodedInfo. A future change will change SkCodec to
recommend F16 for bitsPerComponent > 8, but that will be more involved;
it was the reason for the revert of this CL.
Switch conversionSupported to use an SkColorType, which is enough info.
Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.
SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.
TBR=mtklein@chromium.org,reed@google.com
Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[rename]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
sc...@google.com <sc...@google.com> #9
Updating this in light of conversation with brianosman@ and mtklein@ yesterday.
The title still says "Replace SkCodec::getInfo()", but the last CL moved away from that. We again think we should move towards replacing the SkImageInfo on SkCodec, for the following reasons:
- SkColorSpace is transitioning to only include formats that we can draw to/from, but SkCodec can represent an encoded image with an ICC profile that needs to be converted before drawing. So SkCodec should have an skcms profile. SkCodecImageGenerator (or at least, a layer on top of SkCodec) will decide how to convert into an SkColorSpace.
- As stated in #0, the SkColorType is arbitrary; e.g. there is no obvious choice for a YUV image. So we'll switch back to the SkEncodedInfo (keeping in mind the concerns raised inhttps://crbug.com/skia/7353 regarding overspecification). Again, a layer above SkCodec can convert that into the desired SkColorType
- In order to support b/78897918 (support library for ImageDecoder), we'll need to split SkCodec into its own library (that Skia will use) so it won't be able to depend on SkColorType etc.
The title still says "Replace SkCodec::getInfo()", but the last CL moved away from that. We again think we should move towards replacing the SkImageInfo on SkCodec, for the following reasons:
- SkColorSpace is transitioning to only include formats that we can draw to/from, but SkCodec can represent an encoded image with an ICC profile that needs to be converted before drawing. So SkCodec should have an skcms profile. SkCodecImageGenerator (or at least, a layer on top of SkCodec) will decide how to convert into an SkColorSpace.
- As stated in #0, the SkColorType is arbitrary; e.g. there is no obvious choice for a YUV image. So we'll switch back to the SkEncodedInfo (keeping in mind the concerns raised in
- In order to support
sc...@google.com <sc...@google.com> #10
[Empty comment from Monorail migration]
bu...@chromium.org <bu...@chromium.org> #11
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/a2fe63e0db361d402037061b9c431704cc1e32be
commit a2fe63e0db361d402037061b9c431704cc1e32be
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 17:19:33 2018
Build SkEncodedInfo.cpp
It is being added by
https://skia-review.googlesource.com/c/skia/+/136062
Bug: skia:6839
Bug: skia:8052
Change-Id: I552a0e94f04cc29b27450792494e9f0160fb5b3a
Reviewed-on:https://chromium-review.googlesource.com/1183382
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585119}
[modify]https://crrev.com/a2fe63e0db361d402037061b9c431704cc1e32be/skia/BUILD.gn
commit a2fe63e0db361d402037061b9c431704cc1e32be
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 17:19:33 2018
Build SkEncodedInfo.cpp
It is being added by
Bug: skia:6839
Bug: skia:8052
Change-Id: I552a0e94f04cc29b27450792494e9f0160fb5b3a
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585119}
[modify]
bu...@chromium.org <bu...@chromium.org> #12
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/81886e8f9461c7049751c6a2c194a1df632dd362
commit 81886e8f9461c7049751c6a2c194a1df632dd362
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 18:16:20 2018
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>
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpBaseCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkGifCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpStandardCodec.h
[add]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/resources/images/mandrill_cmyk.jpg
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/gn/tests.gni
[add]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/tests/EncodedInfoTest.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpRLECodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkWebpCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkPngCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpRLECodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkSwizzler.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkIcoCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkIcoCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpStandardCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/include/private/SkEncodedInfo.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/BUILD.gn
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpMaskCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkJpegCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpBaseCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpMaskCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkHeifCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkEncodedInfo.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/include/codec/SkCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkWbmpCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkCodecPriv.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/tests/CodecTest.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkJpegCodec.cpp
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkBmpCodec.h
[modify]https://crrev.com/81886e8f9461c7049751c6a2c194a1df632dd362/src/codec/SkPngCodec.cpp
commit 81886e8f9461c7049751c6a2c194a1df632dd362
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 18:16:20 2018
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
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:
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #13
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/33d5394d08f645a9f612ba96115acb0e8408a97c
commit 33d5394d08f645a9f612ba96115acb0e8408a97c
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 21:13:50 2018
Revert "Switch SkCodec to use skcms" and follow on change
This reverts commit 81886e8f9461c7049751c6a2c194a1df632dd362 and
f8ae5ce20cf6df2dab4149fb2838d9d8dc6bd1af
("Fix CMYK handling in JPEG codec")
This fixes the Android build, which was failing a CTS test with this
change.
Bug: skia:6839
Bug: skia:8052
TBR=djsollen@google.com
As with the original, no API change
Change-Id: Ic744a610e9f431707f871de44f9f64040bc60d14
Reviewed-on:https://skia-review.googlesource.com/148810
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpBaseCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkGifCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpStandardCodec.h
[delete]https://crrev.com/45bc27aff2c9f7c4e674fce979292b76f1f4068e/resources/images/mandrill_cmyk.jpg
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/gn/tests.gni
[delete]https://crrev.com/45bc27aff2c9f7c4e674fce979292b76f1f4068e/tests/EncodedInfoTest.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpRLECodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkWebpCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkPngCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpRLECodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkSwizzler.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkIcoCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkIcoCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpStandardCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/include/private/SkEncodedInfo.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/BUILD.gn
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpMaskCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkJpegCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpBaseCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpMaskCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkHeifCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkEncodedInfo.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/include/codec/SkCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkWbmpCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkCodecPriv.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/tests/CodecTest.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkJpegCodec.cpp
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkBmpCodec.h
[modify]https://crrev.com/33d5394d08f645a9f612ba96115acb0e8408a97c/src/codec/SkPngCodec.cpp
commit 33d5394d08f645a9f612ba96115acb0e8408a97c
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Aug 22 21:13:50 2018
Revert "Switch SkCodec to use skcms" and follow on change
This reverts commit 81886e8f9461c7049751c6a2c194a1df632dd362 and
f8ae5ce20cf6df2dab4149fb2838d9d8dc6bd1af
("Fix CMYK handling in JPEG codec")
This fixes the Android build, which was failing a CTS test with this
change.
Bug: skia:6839
Bug: skia:8052
TBR=djsollen@google.com
As with the original, no API change
Change-Id: Ic744a610e9f431707f871de44f9f64040bc60d14
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #14
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/49894f450fb155f4f236067109abd9017c85096e
commit 49894f450fb155f4f236067109abd9017c85096e
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 24 17:46:25 2018
Reland "Switch SkCodec to use skcms" plus fixes
This reverts commit 33d5394d08f645a9f612ba96115acb0e8408a97c,
relanding 81886e8f9461c7049751c6a2c194a1df632dd362 as well as
"Fix CMYK handling in JPEG codec" (commit
f8ae5ce20cf6df2dab4149fb2838d9d8dc6bd1af)
Add a test based on the CTS test that failed in the original commit.
purple-displayprofile.png is the image used in the CTS test, with the
Android license.
This also adds a fix for SkAndroidCodec, ensuring that we continue to
use a wide gamut SkColorSpace for images that do not have a numerical
transfer function and have a wide gamut. This includes a test, with
wide-gamut.png, which was created with Photoshop and the profile
"sRGB_Calibrated_Homogeneous.icc" from the skcms tree.
Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
TBR=djsollen@google.com
As with the original, no API change
Change-Id: I4e5bba6a3151f9dc6491e8eda73d4de0535bd692
Reviewed-on:https://skia-review.googlesource.com/149043
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpBaseCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkGifCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpStandardCodec.h
[add]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/resources/images/mandrill_cmyk.jpg
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkWbmpCodec.h
[add]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/resources/images/purple-displayprofile.png
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpMaskCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/gn/tests.gni
[add]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/tests/EncodedInfoTest.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpRLECodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkWebpCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkPngCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpRLECodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkSwizzler.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkIcoCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkIcoCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpStandardCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/include/private/SkEncodedInfo.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/BUILD.gn
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpMaskCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkJpegCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpBaseCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/tests/AndroidCodecTest.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkHeifCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkEncodedInfo.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/include/codec/SkCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkWbmpCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkAndroidCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkCodecPriv.h
[add]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/resources/images/wide-gamut.png
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/tests/CodecTest.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkJpegCodec.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkBmpCodec.h
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/core/SkColorSpaceXform.cpp
[modify]https://crrev.com/49894f450fb155f4f236067109abd9017c85096e/src/codec/SkPngCodec.cpp
commit 49894f450fb155f4f236067109abd9017c85096e
Author: Leon Scroggins III <scroggo@google.com>
Date: Fri Aug 24 17:46:25 2018
Reland "Switch SkCodec to use skcms" plus fixes
This reverts commit 33d5394d08f645a9f612ba96115acb0e8408a97c,
relanding 81886e8f9461c7049751c6a2c194a1df632dd362 as well as
"Fix CMYK handling in JPEG codec" (commit
f8ae5ce20cf6df2dab4149fb2838d9d8dc6bd1af)
Add a test based on the CTS test that failed in the original commit.
purple-displayprofile.png is the image used in the CTS test, with the
Android license.
This also adds a fix for SkAndroidCodec, ensuring that we continue to
use a wide gamut SkColorSpace for images that do not have a numerical
transfer function and have a wide gamut. This includes a test, with
wide-gamut.png, which was created with Photoshop and the profile
"sRGB_Calibrated_Homogeneous.icc" from the skcms tree.
Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
TBR=djsollen@google.com
As with the original, no API change
Change-Id: I4e5bba6a3151f9dc6491e8eda73d4de0535bd692
Reviewed-on:
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #15
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/83988edfd3256dc822b961362aad7fbc3e0cdabc
commit 83988edfd3256dc822b961362aad7fbc3e0cdabc
Author: Leon Scroggins <scroggo@google.com>
Date: Fri Aug 24 21:41:37 2018
Revert "Reland "Switch SkCodec to use skcms" plus fixes"
This reverts commit 49894f450fb155f4f236067109abd9017c85096e.
Reason for revert: Breaking a CTS test on the Android roll:
java.lang.AssertionError: expected:<67043583> but was:<50266367>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at android.graphics.cts.BitmapColorSpaceTest.verifyGetPixel(BitmapColorSpaceTest.java:301)
at android.graphics.cts.BitmapColorSpaceTest.inColorSpaceP3ToSRGB(BitmapColorSpaceTest.java:612)
Expected: 3FF00FF Actual: 2FF00FF
Original change's description:
commit 83988edfd3256dc822b961362aad7fbc3e0cdabc
Author: Leon Scroggins <scroggo@google.com>
Date: Fri Aug 24 21:41:37 2018
Revert "Reland "Switch SkCodec to use skcms" plus fixes"
This reverts commit 49894f450fb155f4f236067109abd9017c85096e.
Reason for revert: Breaking a CTS test on the Android roll:
java.lang.AssertionError: expected:<67043583> but was:<50266367>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at android.graphics.cts.BitmapColorSpaceTest.verifyGetPixel(BitmapColorSpaceTest.java:301)
at android.graphics.cts.BitmapColorSpaceTest.inColorSpaceP3ToSRGB(BitmapColorSpaceTest.java:612)
Expected: 3FF00FF Actual: 2FF00FF
Original change's description:
TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com
Change-Id: Ie71e1fecc26de8225d2fe603765c1e1e0d738634
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6839, skia:8052, skia:8278
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[delete]
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[delete]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #16
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/36f7e3298e9d8e21d095197db0ec72c155f7d61f
commit 36f7e3298e9d8e21d095197db0ec72c155f7d61f
Author: Leon Scroggins III <scroggo@google.com>
Date: Mon Aug 27 16:16:14 2018
Reland "Switch SkCodec to use skcms plus fixes""
This reverts commit 83988edfd3256dc822b961362aad7fbc3e0cdabc.
The CTS failure was actually due to another CL.
TBR=brianosman@google.com
TBR=djsollen@google.com
Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
Change-Id: Id9f152ec2c66467d90f49df223cb9b7c168ac2ac
Reviewed-on:https://skia-review.googlesource.com/149483
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpBaseCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkGifCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpStandardCodec.h
[add]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/resources/images/mandrill_cmyk.jpg
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkWbmpCodec.h
[add]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/resources/images/purple-displayprofile.png
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpMaskCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/gn/tests.gni
[add]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/tests/EncodedInfoTest.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpRLECodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkWebpCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkPngCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpRLECodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkSwizzler.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkIcoCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkIcoCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpStandardCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/include/private/SkEncodedInfo.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/BUILD.gn
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpMaskCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkJpegCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpBaseCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/tests/AndroidCodecTest.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkHeifCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkEncodedInfo.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/include/codec/SkCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkWbmpCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkAndroidCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkCodecPriv.h
[add]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/resources/images/wide-gamut.png
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/tests/CodecTest.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkJpegCodec.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkBmpCodec.h
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/core/SkColorSpaceXform.cpp
[modify]https://crrev.com/36f7e3298e9d8e21d095197db0ec72c155f7d61f/src/codec/SkPngCodec.cpp
commit 36f7e3298e9d8e21d095197db0ec72c155f7d61f
Author: Leon Scroggins III <scroggo@google.com>
Date: Mon Aug 27 16:16:14 2018
Reland "Switch SkCodec to use skcms plus fixes""
This reverts commit 83988edfd3256dc822b961362aad7fbc3e0cdabc.
The CTS failure was actually due to another CL.
TBR=brianosman@google.com
TBR=djsollen@google.com
Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
Change-Id: Id9f152ec2c66467d90f49df223cb9b7c168ac2ac
Reviewed-on:
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #17
The following revision refers to this bug:
https://skia.googlesource.com/skia/+/712476ecdb0d8159f369766c2f80504a68aae6a4
commit 712476ecdb0d8159f369766c2f80504a68aae6a4
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Oct 03 20:14:18 2018
Remove SkCodec::fSrcInfo
This object is now redundant with fEncodedInfo. It holds an
SkColorSpace, which is never used now that SkCodec uses skcms.
SkCodec::getInfo() no longer returns a reference, but creates an
SkImageInfo from the SkEncodedInfo the same way fSrcInfo was
previously created.
Add SkCodec::bounds() and ::dimensions() to replace calling these
methods on getInfo().
Remove srcInfo from SkMaskSwizzler::Create, which just wants to know
whether the src is opaque.
Remove the srcColorType from conversionSupported. Only the base class
version used it. Make it look at fEncodedInfo.color() instead.
Bug: skia:6839
Bug: chromium:887372
Change-Id: I2c0583cae76121211c1a6b49979972fa86daf077
Reviewed-on:https://skia-review.googlesource.com/c/157563
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkBmpCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkWbmpCodec.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkSampledCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkGifCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkHeifCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkMaskSwizzler.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkWebpCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkJpegCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkIcoCodec.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkIcoCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkMaskSwizzler.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkBmpStandardCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkHeifCodec.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkBmpMaskCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkJpegCodec.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkRawCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/tests/ColorSpaceTest.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/include/codec/SkCodec.h
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkWbmpCodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkBmpRLECodec.cpp
[modify]https://crrev.com/712476ecdb0d8159f369766c2f80504a68aae6a4/src/codec/SkPngCodec.cpp
commit 712476ecdb0d8159f369766c2f80504a68aae6a4
Author: Leon Scroggins III <scroggo@google.com>
Date: Wed Oct 03 20:14:18 2018
Remove SkCodec::fSrcInfo
This object is now redundant with fEncodedInfo. It holds an
SkColorSpace, which is never used now that SkCodec uses skcms.
SkCodec::getInfo() no longer returns a reference, but creates an
SkImageInfo from the SkEncodedInfo the same way fSrcInfo was
previously created.
Add SkCodec::bounds() and ::dimensions() to replace calling these
methods on getInfo().
Remove srcInfo from SkMaskSwizzler::Create, which just wants to know
whether the src is opaque.
Remove the srcColorType from conversionSupported. Only the base class
version used it. Make it look at fEncodedInfo.color() instead.
Bug: skia:6839
Bug: chromium:887372
Change-Id: I2c0583cae76121211c1a6b49979972fa86daf077
Reviewed-on:
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
is...@google.com <is...@google.com> #18
Edits/notes reflect the following in Monorail: blocked-on.
[Monorail blocked-on:crbug.com/skia/8052 ]
[Monorail blocked-on:
sc...@google.com <sc...@google.com> #19
No current plans to continue this work.
Description
getInfo() returns an SkImageInfo, but it has a couple of problems:
- as mentioned in
- The SkImageInfo also contains the native SkColorSpace of the encoded data. We'd rather hide this when it is one that Skia cannot draw. (See discussion in
Proposal: Add the following methods to SkCodec:
- dimensions(), returning width and height
- colorSpace(), which only returns the native color space if isNumericalTransferFn
- toXYZD50(), which calls fColorSpace->toXYZD50. Both Chrome and Android want to use the matrix to create a new SkColorSpace if isNumericalTransferFn returned false, and this allows them to do that.