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

Issue 2447863002: Report repetition count in SkCodec (Closed)

Created:
4 years, 1 month ago by scroggo_chromium
Modified:
4 years, 1 month ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Report repetition count in SkCodec Add a new accessor to retrieve the repetition count. Remove constants (and corresponding copyright) in SkCodecAnimation. These may make sense for the calling code, but are not needed here. kRepetitionCountInfinite corresponds to Blink's kAnimationLoopInfinite. Move cLoopCountNotSeen to private. It is used to determine whether we still need to parse. Add a new enum to the parse query - only parse enough to determine the repetition count. Unlike Chromium, SkGifCodec does not account for deleting the reader (which SkGifCodec does not do) or failed decodes. Add a test. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2447863002 Committed: https://skia.googlesource.com/skia/+/e71b1a1496738ebce4a8cac4ffa5ee1413996542

Patch Set 1 #

Total comments: 6

Patch Set 2 : Return a bool, with multiple out parameters #

Total comments: 2

Patch Set 3 : Only parse as necessary. Test null vector. #

Patch Set 4 : Update comment #

Patch Set 5 : Separate method for accessing the loop count #

Patch Set 6 : rebase #

Patch Set 7 : Make colorTables.gif use a different loop count #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -62 lines) Patch
M include/codec/SkCodec.h View 1 2 3 4 5 3 chunks +21 lines, -2 lines 0 comments Download
M resources/colorTables.gif View 1 2 3 4 5 6 Binary file 0 comments Download
M src/codec/SkCodecAnimation.h View 2 chunks +0 lines, -44 lines 0 comments Download
M src/codec/SkGifCodec.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/codec/SkGifCodec.cpp View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M tests/CodecAnimTest.cpp View 1 2 3 4 5 6 2 chunks +20 lines, -12 lines 0 comments Download
M third_party/gif/SkGifImageReader.h View 1 2 3 4 5 4 chunks +10 lines, -3 lines 0 comments Download
M third_party/gif/SkGifImageReader.cpp View 1 2 3 4 5 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 30 (15 generated)
scroggo_chromium
4 years, 1 month ago (2016-10-24 19:24:37 UTC) #3
scroggo_chromium
cblume@, please take a look. This API makes sense to me, and I think it ...
4 years, 1 month ago (2016-10-26 14:39:38 UTC) #6
cblume
https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h#newcode623 include/codec/SkCodec.h:623: std::vector<FrameInfo> getFrameInfo(int* outRepetitionCount = nullptr) { I like where ...
4 years, 1 month ago (2016-10-26 17:45:59 UTC) #7
scroggo_chromium
https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h#newcode623 include/codec/SkCodec.h:623: std::vector<FrameInfo> getFrameInfo(int* outRepetitionCount = nullptr) { On 2016/10/26 17:45:59, ...
4 years, 1 month ago (2016-10-26 18:42:18 UTC) #8
scroggo_chromium
reed@, can you take a look at the public API in SkCodec.h? Patch set 1 ...
4 years, 1 month ago (2016-10-27 20:54:16 UTC) #10
cblume
https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h#newcode623 include/codec/SkCodec.h:623: std::vector<FrameInfo> getFrameInfo(int* outRepetitionCount = nullptr) { On 2016/10/26 18:42:18, ...
4 years, 1 month ago (2016-10-28 01:09:42 UTC) #11
scroggo_chromium
https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/2447863002/diff/1/include/codec/SkCodec.h#newcode623 include/codec/SkCodec.h:623: std::vector<FrameInfo> getFrameInfo(int* outRepetitionCount = nullptr) { On 2016/10/28 01:09:41, ...
4 years, 1 month ago (2016-10-28 11:49:41 UTC) #12
cblume
On 2016/10/28 11:49:41, scroggo_chromium wrote: > I still think you always want the FrameInfo when ...
4 years, 1 month ago (2016-10-28 17:21:37 UTC) #13
reed1
api lgtm https://codereview.chromium.org/2447863002/diff/20001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/2447863002/diff/20001/include/codec/SkCodec.h#newcode622 include/codec/SkCodec.h:622: * times an animated image should repeat. ...
4 years, 1 month ago (2016-10-31 14:17:01 UTC) #14
scroggo
PTAL at patch sets 4 and 5. 4 tests for a null vector and updates ...
4 years, 1 month ago (2016-10-31 19:12:27 UTC) #17
reed1
I'm fine as is, or using a stand-alone getter.
4 years, 1 month ago (2016-10-31 19:15:36 UTC) #18
joostouwerling
I have a slight preference for patch set 5. The only downside would be an ...
4 years, 1 month ago (2016-10-31 20:03:54 UTC) #19
cblume
non-owner lgtm on all of them. Whatever you choose, I'm happy with. :)
4 years, 1 month ago (2016-10-31 22:01:32 UTC) #20
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/2447863002/120001
4 years, 1 month ago (2016-11-01 14:55:04 UTC) #28
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 15:28:32 UTC) #30
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://skia.googlesource.com/skia/+/e71b1a1496738ebce4a8cac4ffa5ee1413996542

Powered by Google App Engine
This is Rietveld 408576698