Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Issue 2716533002: [PNGImageDecoder] Clean up readColorSpace, TODOs, cruft (Closed)

Created:
3 years, 10 months ago by Noel Gordon
Modified:
3 years, 9 months ago
CC:
chromium-reviews, blink-reviews, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[PNGImageDecoder] Clean up readColorSpace, TODOs, cruft inline sk_sp<SkColorSpace> readColorSpace Prefer the early return to prevent the code from dancing off to the right of the page. Clarify comment about cHRM+gAMA: we should never guess sRGB if there is no gAMA, that could be just as wrong. Images with no profile could be assumed to be sRGB but it's not the job of this lower-layer code to ever decide this matter: a system run-time flag or similar should be used. PNGImageDecoder::headerAvailable Remove unneeded filter variable, sk_sp<SkColorSpace> is convertible to bool and also move it into the callee, remove TODOs done or that aren't worth doing, add TODO about GRAY CMYK profiles, state why we "Update our info now", use DCHECK instead of ASSERT, and remove all unused transparency variables. PNGImageDecoder::rowAvailable Fix up the blink formatting of our libpng comments, ditch a C-style cast per style, move the alpha tracking code into the associated if branch to match an upcoming change to this code. No change in behavior, no new tests. BUG=439655 Review-Url: https://codereview.chromium.org/2716533002 Cr-Commit-Position: refs/heads/master@{#452553} Committed: https://chromium.googlesource.com/chromium/src/+/1a37300047e6ddefeb685d021e353ed08e3caffc

Patch Set 1 #

Patch Set 2 : Moar cleaning, ASSERT is DCHECK. #

Total comments: 16

Patch Set 3 : Remove unused transparency variables. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -109 lines) Patch
M third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp View 1 2 10 chunks +91 lines, -109 lines 0 comments Download

Messages

Total messages: 40 (25 generated)
Noel Gordon
The came up in connection with the APNG patch. We should remove old cruft and ...
3 years, 10 months ago (2017-02-23 07:11:13 UTC) #11
Noel Gordon
https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp (left): https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp#oldcode173 third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp:173: // transfer function is not necessarily a 2.2 exponential. ...
3 years, 10 months ago (2017-02-23 10:43:56 UTC) #16
Noel Gordon
https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp (left): https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp#oldcode104 third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp:104: // However, the current behavior matches Safari and Firefox. ...
3 years, 10 months ago (2017-02-23 10:53:42 UTC) #17
Noel Gordon
3 years, 10 months ago (2017-02-23 10:53:56 UTC) #18
msarett1
code lgtm I have nits about the comments, but those are of secondary importance. https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp ...
3 years, 10 months ago (2017-02-23 14:07:03 UTC) #19
msarett1
https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp (left): https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp#oldcode177 third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp:177: // and do a full color space transformation if ...
3 years, 10 months ago (2017-02-23 14:09:34 UTC) #20
scroggo_chromium
On 2017/02/23 07:11:13, noel gordon wrote: > The came up in connection with the APNG ...
3 years, 10 months ago (2017-02-23 15:11:51 UTC) #21
Noel Gordon
On 2017/02/23 15:11:51, scroggo_chromium wrote: > On 2017/02/23 07:11:13, noel gordon wrote: > > The ...
3 years, 10 months ago (2017-02-23 16:48:49 UTC) #24
Noel Gordon
New patch uploaded, PTAL https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp (left): https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp#oldcode177 third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp:177: // and do a full ...
3 years, 10 months ago (2017-02-23 16:49:06 UTC) #25
scroggo_chromium
lgtm
3 years, 10 months ago (2017-02-23 16:58:06 UTC) #27
Noel Gordon
https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp (left): https://codereview.chromium.org/2716533002/diff/20001/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp#oldcode104 third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp:104: // However, the current behavior matches Safari and Firefox. ...
3 years, 10 months ago (2017-02-23 18:06:48 UTC) #28
Noel Gordon
Ahem ... IE draws a Pear, the Windows Image Viewer draws an _Apple_, or vice-versa.
3 years, 10 months ago (2017-02-23 18:10:31 UTC) #29
Noel Gordon
On 2017/02/23 16:58:06, scroggo_chromium wrote: > lgtm OK thanks. Will try to land.
3 years, 10 months ago (2017-02-23 18:10:56 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2716533002/40001
3 years, 10 months ago (2017-02-23 18:13:25 UTC) #35
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 18:20:05 UTC) #38
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/1a37300047e6ddefeb685d021e35...

Powered by Google App Engine
This is Rietveld 408576698