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

Issue 22290002: Beginning work to refactor jpeg tile decoding. (Closed)

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

Description

Beginning work to refactor jpeg tile decoding. Keep common code together, so we can fix bugs in tile and normal decode simultaneously. Convert if-then chains to switch statements for readability. Add getBitmapConfig, common to both normal and tile decode, which ensures that they behave the same. getBitmapConfig uses the code originally in onDecode, so subsetting grayscale into A8 now works. In getBitmapConfig, handle JCS_YCCK properly. Fix a bug where requesting A8 from a JCS_CMYK image would result in a total failure to decode, since we would change out_color_space to an invalid choice. Factor common code for applying dither and changing the out_color_space into apply_dither_mode (final name TBD). Skips CMYK like normal decoding did before. BUG=skia:1472 BUG=https://b.corp.google.com/issue?id=9466275 BUG=https://b.corp.google.com/issue?id=9189955 R=mtklein@google.com Committed: https://code.google.com/p/skia/source/detail?r=10629

Patch Set 1 #

Total comments: 39

Patch Set 2 : Respond to comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -104 lines) Patch
M src/images/SkImageDecoder_libjpeg.cpp View 1 16 chunks +182 lines, -104 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
scroggo
In the refactor, a bunch of code has been both moved and rewritten, so I ...
7 years, 4 months ago (2013-08-05 21:47:51 UTC) #1
scroggo
7 years, 4 months ago (2013-08-05 21:48:08 UTC) #2
mtklein
I'm sorry that a lot of these comments are tangential, but I figured if I ...
7 years, 4 months ago (2013-08-05 22:31:09 UTC) #3
scroggo
> I'm sorry that a lot of these comments are tangential, > but I figured ...
7 years, 4 months ago (2013-08-06 15:06:27 UTC) #4
mtklein
https://codereview.chromium.org/22290002/diff/1/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/22290002/diff/1/src/images/SkImageDecoder_libjpeg.cpp#newcode124 src/images/SkImageDecoder_libjpeg.cpp:124: jpeg_decompress_struct* cinfo() { return &fCInfo; } On 2013/08/06 15:06:27, ...
7 years, 4 months ago (2013-08-06 15:22:48 UTC) #5
scroggo
https://codereview.chromium.org/22290002/diff/1/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/22290002/diff/1/src/images/SkImageDecoder_libjpeg.cpp#newcode124 src/images/SkImageDecoder_libjpeg.cpp:124: jpeg_decompress_struct* cinfo() { return &fCInfo; } On 2013/08/06 15:22:48, ...
7 years, 4 months ago (2013-08-06 15:29:46 UTC) #6
mtklein
gotcha. lgtm
7 years, 4 months ago (2013-08-06 15:33:59 UTC) #7
scroggo
7 years, 4 months ago (2013-08-07 21:09:20 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 manually as r10629 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698