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

Issue 1643623004: A variety of SkPngCodec clean-ups (Closed)

Created:
4 years, 10 months ago by msarett
Modified:
4 years, 10 months ago
Reviewers:
scroggo
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

A variety of SkPngCodec clean-ups (1) Remove #ifdefs that extend support to > 1.2. Using nullptr everywhere should work on all versions. (2) Use png_get_valid(tRNS) to check for transparency It does the same thing we were doing previously in less work. (3) Remove image size check Clients allocate their own memory, and they have the option to perform scaled and partial decodes. So we don't need to arbitrarily fail on large images. (4) Remove FIXME for subsitute trans color libpng is already doing this for us. (5) Remove #ifdef PNG_READ_PACK_SUPPORTED We don't have a fallback, so we'll fail to compile if this isn't supported. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643623004 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/13a912354875a747aefb1f00de50eb3ec454ab1f

Patch Set 1 : #

Total comments: 38

Patch Set 2 : Response to comments #

Total comments: 2

Patch Set 3 : Changes to decodePalette() #

Patch Set 4 : Change comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -155 lines) Patch
M src/codec/SkPngCodec.cpp View 1 2 3 15 chunks +106 lines, -155 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 24 (16 generated)
msarett
This shouldn't change much, but IMO it makes things a little more understandable and removes ...
4 years, 10 months ago (2016-01-28 01:26:18 UTC) #4
msarett
https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (left): https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp#oldcode571 src/codec/SkPngCodec.cpp:571: // FIXME: do we need substituteTranspColor? Note that we ...
4 years, 10 months ago (2016-01-28 02:06:46 UTC) #5
scroggo
https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (left): https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp#oldcode38 src/codec/SkPngCodec.cpp:38: // Helper macros On 2016/01/28 01:26:18, msarett wrote: > ...
4 years, 10 months ago (2016-01-28 21:07:33 UTC) #6
msarett
The commit message has been improved :). https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (left): https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp#oldcode38 src/codec/SkPngCodec.cpp:38: // Helper ...
4 years, 10 months ago (2016-01-28 22:19:25 UTC) #14
scroggo
lgtm https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (right): https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp#newcode120 src/codec/SkPngCodec.cpp:120: SkOpts::RGB_to_BGR1(colorPtr, palette, numColors); On 2016/01/28 22:19:25, msarett wrote: ...
4 years, 10 months ago (2016-01-29 15:40:27 UTC) #15
msarett
PTAL I made decodePalette() look more similar to the original design. https://codereview.chromium.org/1643623004/diff/20001/src/codec/SkPngCodec.cpp File src/codec/SkPngCodec.cpp (right): ...
4 years, 10 months ago (2016-01-29 18:56:08 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1643623004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1643623004/100001
4 years, 10 months ago (2016-02-01 15:52:09 UTC) #22
commit-bot: I haz the power
4 years, 10 months ago (2016-02-01 16:03:36 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as
https://skia.googlesource.com/skia/+/13a912354875a747aefb1f00de50eb3ec454ab1f

Powered by Google App Engine
This is Rietveld 408576698