diff options
author | Matt Sarett <msarett@google.com> | 2017-06-09 10:18:34 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-09 15:26:48 +0000 |
commit | ee7c8202ebb50dae6c7a95222232969509ea2dfa (patch) | |
tree | d16e93cd2c5bce193ddb215b9d867f463cc49e6d /src/codec | |
parent | 1aa2369883ca9db9a07efd353ff8f0acec83ff91 (diff) |
Remove debug checks for unsupported ICC profiles
This was never fully integrated with our automated image testing.
I feel it has limited usefulness in terms of catching bugs.
Bug: skia:
Change-Id: Iecd0a4e9b664ab0b351debde45ada864379de7ec
Reviewed-on: https://skia-review.googlesource.com/19267
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec')
-rw-r--r-- | src/codec/SkJpegCodec.cpp | 6 | ||||
-rw-r--r-- | src/codec/SkPngCodec.cpp | 2 | ||||
-rw-r--r-- | src/codec/SkWebpCodec.cpp | 5 |
3 files changed, 0 insertions, 13 deletions
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index a428b64939..4d97cce124 100644 --- a/src/codec/SkJpegCodec.cpp +++ b/src/codec/SkJpegCodec.cpp @@ -225,7 +225,6 @@ bool SkJpegCodec::ReadHeader(SkStream* stream, SkCodec** codecOut, JpegDecoderMg Origin orientation = get_exif_orientation(decoderMgr->dinfo()); sk_sp<SkData> iccData = get_icc_profile(decoderMgr->dinfo()); sk_sp<SkColorSpace> colorSpace = nullptr; - bool unsupportedICC = false; if (iccData) { SkColorSpace_Base::ICCTypeFlag iccType = SkColorSpace_Base::kRGB_ICCTypeFlag; switch (decoderMgr->dinfo()->jpeg_color_space) { @@ -241,10 +240,6 @@ bool SkJpegCodec::ReadHeader(SkStream* stream, SkCodec** codecOut, JpegDecoderMg break; } colorSpace = SkColorSpace_Base::MakeICC(iccData->data(), iccData->size(), iccType); - if (!colorSpace) { - SkCodecPrintf("Could not create SkColorSpace from ICC data.\n"); - unsupportedICC = true; - } } if (!colorSpace) { colorSpace = defaultColorSpace; @@ -254,7 +249,6 @@ bool SkJpegCodec::ReadHeader(SkStream* stream, SkCodec** codecOut, JpegDecoderMg const int height = decoderMgr->dinfo()->image_height; SkJpegCodec* codec = new SkJpegCodec(width, height, info, stream, decoderMgr.release(), std::move(colorSpace), orientation); - codec->setUnsupportedICC(unsupportedICC); *codecOut = codec; } else { SkASSERT(nullptr != decoderMgrOut); diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp index 29057cb298..d77fe4007d 100644 --- a/src/codec/SkPngCodec.cpp +++ b/src/codec/SkPngCodec.cpp @@ -909,7 +909,6 @@ void AutoCleanPng::infoCallback(size_t idatLength) { iccType |= SkColorSpace_Base::kGray_ICCTypeFlag; } sk_sp<SkColorSpace> colorSpace = read_color_space(fPng_ptr, fInfo_ptr, iccType); - const bool unsupportedICC = !colorSpace; if (!colorSpace) { // Treat unsupported/invalid color spaces as sRGB. colorSpace = SkColorSpace::MakeSRGB(); @@ -935,7 +934,6 @@ void AutoCleanPng::infoCallback(size_t idatLength) { *fOutCodec = new SkPngInterlacedDecoder(encodedInfo, imageInfo, fStream, fChunkReader, fPng_ptr, fInfo_ptr, bitDepth, numberPasses); } - (*fOutCodec)->setUnsupportedICC(unsupportedICC); static_cast<SkPngCodec*>(*fOutCodec)->setIdatLength(idatLength); } diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp index f702a3ae98..65250a41c1 100644 --- a/src/codec/SkWebpCodec.cpp +++ b/src/codec/SkWebpCodec.cpp @@ -85,12 +85,8 @@ SkCodec* SkWebpCodec::NewFromStream(SkStream* stream) { WebPChunkIterator chunkIterator; SkAutoTCallVProc<WebPChunkIterator, WebPDemuxReleaseChunkIterator> autoCI(&chunkIterator); sk_sp<SkColorSpace> colorSpace = nullptr; - bool unsupportedICC = false; if (WebPDemuxGetChunk(demux, "ICCP", 1, &chunkIterator)) { colorSpace = SkColorSpace::MakeICC(chunkIterator.chunk.bytes, chunkIterator.chunk.size); - if (!colorSpace) { - unsupportedICC = true; - } } if (!colorSpace) { colorSpace = SkColorSpace::MakeSRGB(); @@ -150,7 +146,6 @@ SkCodec* SkWebpCodec::NewFromStream(SkStream* stream) { SkWebpCodec* codecOut = new SkWebpCodec(width, height, info, std::move(colorSpace), streamDeleter.release(), demux.release(), std::move(data)); - codecOut->setUnsupportedICC(unsupportedICC); return codecOut; } |