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

Issue 1040453002: Add SkPngChunkReader. (Closed)

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

Description

Add SkPngChunkReader. This class allows a client of SkCodec to read chunks in the data stream that are not recognized by libpng. This is used by Android to specify ninepatch data. Taken from SkImageDecoder::Peeker. Modify the name of the class and its method to be more specific to their use. Make SkImageDecoder::Peeker a subclass of the new class, to help stage the change in Android. Add a test to verify that it works. BUG=skia:4574 BUG=skia:3257 Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b Committed: https://skia.googlesource.com/skia/+/cf98fa93116cf5efcc42d48c22fb4bd76896acdc

Patch Set 1 #

Patch Set 2 : Peeker -> SkChunkReader, passed to constructor. #

Total comments: 5

Patch Set 3 : Rename to SkPngChunkReader. Remove unneeded include. #

Patch Set 4 : Fix spacing #

Patch Set 5 : Rebase #

Patch Set 6 : Fix use after delete. #

Patch Set 7 : Add test; stage #

Patch Set 8 : Test rewinding; add dox #

Total comments: 7

Patch Set 9 : Put ChunkReader on the stack #

Patch Set 10 : Update SkImageDecoder_empty #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -72 lines) Patch
M gyp/skia_for_android_framework_defines.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M include/codec/SkCodec.h View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M include/core/SkImageDecoder.h View 1 2 3 4 5 6 4 chunks +17 lines, -17 lines 0 comments Download
A include/core/SkPngChunkReader.h View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download
M src/codec/SkCodec.cpp View 1 2 3 4 5 6 4 chunks +22 lines, -13 lines 0 comments Download
M src/codec/SkCodec_libpng.h View 1 2 3 4 5 4 chunks +12 lines, -10 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 1 2 3 4 5 6 7 9 chunks +55 lines, -24 lines 0 comments Download
M src/images/SkImageDecoder.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M src/ports/SkImageDecoder_empty.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M tests/CodexTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +160 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (10 generated)
scroggo
5 years, 9 months ago (2015-03-26 21:16:43 UTC) #2
djsollen
what do we anticipate this being used for since we don't expose it in the ...
5 years, 9 months ago (2015-03-27 01:23:46 UTC) #3
scroggo
On 2015/03/27 01:23:46, djsollen wrote: > what do we anticipate this being used for since ...
5 years, 9 months ago (2015-03-27 12:32:37 UTC) #4
scroggo
On 2015/03/27 12:32:37, scroggo wrote: > On 2015/03/27 01:23:46, djsollen wrote: > > what do ...
5 years, 8 months ago (2015-03-27 15:00:29 UTC) #5
scroggo
PTAL. https://codereview.chromium.org/1040453002/diff/20001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1040453002/diff/20001/include/codec/SkCodec.h#newcode14 include/codec/SkCodec.h:14: #include "SkRefCnt.h" No longer needed. https://codereview.chromium.org/1040453002/diff/20001/include/core/SkChunkReader.h File include/core/SkChunkReader.h ...
5 years, 8 months ago (2015-03-27 19:19:59 UTC) #7
reed1
Just being conservative in introducing new public apis/classes https://codereview.chromium.org/1040453002/diff/20001/include/core/SkChunkReader.h File include/core/SkChunkReader.h (right): https://codereview.chromium.org/1040453002/diff/20001/include/core/SkChunkReader.h#newcode15 include/core/SkChunkReader.h:15: * ...
5 years, 8 months ago (2015-03-27 20:13:47 UTC) #8
scroggo
https://codereview.chromium.org/1040453002/diff/20001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1040453002/diff/20001/include/codec/SkCodec.h#newcode14 include/codec/SkCodec.h:14: #include "SkRefCnt.h" On 2015/03/27 19:19:58, scroggo wrote: > No ...
5 years, 8 months ago (2015-04-01 14:53:48 UTC) #9
djsollen
looks fine to me from a code perspective, but not sure if Mike still wants ...
5 years, 8 months ago (2015-04-01 16:11:14 UTC) #10
reed1
lgtm, but I think we should more strongly determine/document the lifecycle of the peeker... 1. ...
5 years, 8 months ago (2015-04-03 20:05:42 UTC) #11
scroggo
PTAL. New changes since the last review: - Added a test - Handle staging better ...
5 years, 1 month ago (2015-11-20 18:40:02 UTC) #15
msarett
https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h#newcode38 include/codec/SkCodec.h:38: static SkCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL); This is in ...
5 years, 1 month ago (2015-11-20 20:21:23 UTC) #16
scroggo
https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h#newcode38 include/codec/SkCodec.h:38: static SkCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL); On 2015/11/20 20:21:23, ...
5 years, 1 month ago (2015-11-20 21:14:58 UTC) #17
msarett
lgtm https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1040453002/diff/140001/include/codec/SkCodec.h#newcode38 include/codec/SkCodec.h:38: static SkCodec* NewFromStream(SkStream*, SkPngChunkReader* = NULL); On 2015/11/20 ...
5 years, 1 month ago (2015-11-20 21:27:26 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1040453002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1040453002/160001
5 years ago (2015-11-23 15:08:24 UTC) #21
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b
5 years ago (2015-11-23 15:20:59 UTC) #22
fmalita_google_do_not_use
On 2015/11/23 15:20:59, commit-bot: I haz the power wrote: > Committed patchset #9 (id:160001) as ...
5 years ago (2015-11-23 15:54:39 UTC) #23
scroggo
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/1472863003/ by scroggo@google.com. ...
5 years ago (2015-11-23 15:56:29 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1040453002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1040453002/180001
5 years ago (2015-11-23 16:01:35 UTC) #28
commit-bot: I haz the power
5 years ago (2015-11-23 16:14:45 UTC) #29
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://skia.googlesource.com/skia/+/cf98fa93116cf5efcc42d48c22fb4bd76896acdc

Powered by Google App Engine
This is Rietveld 408576698