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

Issue 23330002: Avoid getLength in ico decoder. (Closed)

Created:
7 years, 4 months ago by scroggo
Modified:
7 years, 4 months ago
Reviewers:
djsollen
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Avoid getLength in ico decoder. Only call getLength() if hasLength() returned true. Otherwise, copy the stream into an SkDynamicMemoryWStream and copy it into alloc'ed space. Share common code between bmp and ico. BUG=https://b.corp.google.com/issue?id=8432093 R=djsollen@google.com Committed: https://code.google.com/p/skia/source/detail?r=10850

Patch Set 1 #

Total comments: 2

Patch Set 2 : Respond to comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -31 lines) Patch
M gyp/images.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/images/SkImageDecoder_libbmp.cpp View 1 2 chunks +6 lines, -24 lines 0 comments Download
M src/images/SkImageDecoder_libico.cpp View 1 3 chunks +7 lines, -7 lines 0 comments Download
A src/images/SkStreamHelpers.h View 1 1 chunk +27 lines, -0 lines 0 comments Download
A src/images/SkStreamHelpers.cpp View 1 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
scroggo
7 years, 4 months ago (2013-08-19 16:43:38 UTC) #1
djsollen
https://codereview.chromium.org/23330002/diff/1/src/images/SkImageDecoder_libbmp.cpp File src/images/SkImageDecoder_libbmp.cpp (right): https://codereview.chromium.org/23330002/diff/1/src/images/SkImageDecoder_libbmp.cpp#newcode96 src/images/SkImageDecoder_libbmp.cpp:96: extern size_t copy_stream_to_storage(SkAutoMalloc* storage, SkStream* stream); why not make ...
7 years, 4 months ago (2013-08-19 16:57:20 UTC) #2
scroggo
https://codereview.chromium.org/23330002/diff/1/src/images/SkImageDecoder_libbmp.cpp File src/images/SkImageDecoder_libbmp.cpp (right): https://codereview.chromium.org/23330002/diff/1/src/images/SkImageDecoder_libbmp.cpp#newcode96 src/images/SkImageDecoder_libbmp.cpp:96: extern size_t copy_stream_to_storage(SkAutoMalloc* storage, SkStream* stream); On 2013/08/19 16:57:20, ...
7 years, 4 months ago (2013-08-19 18:45:55 UTC) #3
djsollen
lgtm
7 years, 4 months ago (2013-08-19 19:03:54 UTC) #4
scroggo
7 years, 4 months ago (2013-08-21 15:02:35 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r10850 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698