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

Issue 21891007: Fix failure exits from JPEG onBuildTileIndex. (Closed)

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

Description

Fix failure exits from JPEG onBuildTileIndex. The setjmp exited without deleting the SkJPEGImageIndex, and another exit condition deleted the huffman index even though it had not been created yet. Create member functions on SkJPEGImageIndex to make the jpeg calls so it can keep track of what has been created, and avoid destroying anything else. Remove unnecessary lines to set values to their default values. Move all SkJPEGImageIndex code entirely inside #ifdef ANDROID blocks, since no piece of it is used except by ANDROID only code. BUG=skia:1471 R=djsollen@google.com, mtklein@google.com Committed: https://code.google.com/p/skia/source/detail?r=10628

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Use const for unchanging variable. #

Patch Set 4 : Set SkJPEGImageIndex state before calling jpeg functions. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -35 lines) Patch
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 3 6 chunks +95 lines, -35 lines 1 comment Download

Messages

Total messages: 9 (0 generated)
scroggo
7 years, 4 months ago (2013-08-02 22:30:04 UTC) #1
djsollen
https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (left): https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp#oldcode495 src/images/SkImageDecoder_libjpeg.cpp:495: cinfo->do_block_smoothing = 0; You don't initialize these value in ...
7 years, 4 months ago (2013-08-05 12:16:24 UTC) #2
scroggo
https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (left): https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp#oldcode495 src/images/SkImageDecoder_libjpeg.cpp:495: cinfo->do_block_smoothing = 0; On 2013/08/05 12:16:24, djsollen wrote: > ...
7 years, 4 months ago (2013-08-05 13:27:36 UTC) #3
djsollen
lgtm
7 years, 4 months ago (2013-08-05 13:38:04 UTC) #4
mtklein
lgtm https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp#newcode113 src/images/SkImageDecoder_libjpeg.cpp:113: bool success = (JPEG_HEADER_OK == jpeg_read_header(&fCInfo, true)); I ...
7 years, 4 months ago (2013-08-05 14:10:43 UTC) #5
scroggo
https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/21891007/diff/3001/src/images/SkImageDecoder_libjpeg.cpp#newcode113 src/images/SkImageDecoder_libjpeg.cpp:113: bool success = (JPEG_HEADER_OK == jpeg_read_header(&fCInfo, true)); On 2013/08/05 ...
7 years, 4 months ago (2013-08-05 14:33:44 UTC) #6
scroggo
https://codereview.chromium.org/21891007/diff/15001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/21891007/diff/15001/src/images/SkImageDecoder_libjpeg.cpp#newcode76 src/images/SkImageDecoder_libjpeg.cpp:76: fDecompressStarted = false; As mtklein pointed out, in patch ...
7 years, 4 months ago (2013-08-05 15:18:41 UTC) #7
mtklein
On 2013/08/05 15:18:41, scroggo wrote: > https://codereview.chromium.org/21891007/diff/15001/src/images/SkImageDecoder_libjpeg.cpp > File src/images/SkImageDecoder_libjpeg.cpp (right): > > https://codereview.chromium.org/21891007/diff/15001/src/images/SkImageDecoder_libjpeg.cpp#newcode76 > ...
7 years, 4 months ago (2013-08-05 15:21:08 UTC) #8
scroggo
7 years, 4 months ago (2013-08-07 21:02:37 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 manually as r10628 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698