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

Issue 1010983004: Lazy SKP image decoding in DM. (Closed)

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

Description

Lazy SKP image decoding in DM. @sugoi: Early out to avoid some segfaults in SkImageDecoder_libjpeg.cpp. I am just flailing here... things seem to work, but I have no idea why. This prints out a lot: libjpeg error 85 <End Of Image> from output_raw_data [0 0] @halcanary: I'm skipping on ImageSrc for now. Leon's refactoring that quite a lot. This causes minor diffs for the GPU backend, given that we're now going through the YUV path. It also reduced peak RAM usage on my desktop from 1.26GB to 1.08GB. BUG=skia: Committed: https://skia.googlesource.com/skia/+/b3e5e4d314301617d2d48b7589dfd426bd68a671

Patch Set 1 #

Total comments: 1

Patch Set 2 : rebase #

Patch Set 3 : appears_to_be_yuv #

Patch Set 4 : double check #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -4 lines) Patch
M dm/DMSrcSink.cpp View 1 2 3 4 chunks +9 lines, -2 lines 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 3 4 chunks +24 lines, -2 lines 2 comments Download

Messages

Total messages: 23 (9 generated)
mtklein_C
5 years, 9 months ago (2015-03-17 20:02:11 UTC) #3
hal.canary
https://codereview.chromium.org/1010983004/diff/1/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/1010983004/diff/1/src/images/SkImageDecoder_libjpeg.cpp#newcode771 src/images/SkImageDecoder_libjpeg.cpp:771: static bool contains_three_planes(const jpeg_decompress_struct& cinfo) { // Either explain ...
5 years, 9 months ago (2015-03-17 21:32:48 UTC) #4
hal.canary
LGTM. Note that I want to do more ImgSrc/JPEG/PDF testing in the future.
5 years, 9 months ago (2015-03-17 21:37:01 UTC) #5
mtklein
Hey sugoi, any thoughts?
5 years, 9 months ago (2015-03-20 20:39:20 UTC) #7
sugoi1
On 2015/03/20 20:39:20, mtklein wrote: > Hey sugoi, any thoughts? Sorry I forgot about this! ...
5 years, 9 months ago (2015-03-20 20:52:53 UTC) #8
hal.canary
On 2015/03/20 20:52:53, sugoi1 wrote: > ... but I haven't really found examples of JPEG ...
5 years, 9 months ago (2015-03-20 20:55:04 UTC) #9
mtklein
Does something like PS3 make sense to you both?
5 years, 9 months ago (2015-03-20 21:16:57 UTC) #10
hal.canary
On 2015/03/20 21:16:57, mtklein wrote: > Does something like PS3 make sense to you both? ...
5 years, 9 months ago (2015-03-23 17:58:42 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010983004/60001
5 years, 9 months ago (2015-03-25 20:06:31 UTC) #14
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 9 months ago (2015-03-25 20:06:32 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010983004/60001
5 years, 9 months ago (2015-03-25 20:07:41 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/b3e5e4d314301617d2d48b7589dfd426bd68a671
5 years, 9 months ago (2015-03-25 20:13:47 UTC) #20
msarett
https://codereview.chromium.org/1010983004/diff/60001/src/images/SkImageDecoder_libjpeg.cpp File src/images/SkImageDecoder_libjpeg.cpp (right): https://codereview.chromium.org/1010983004/diff/60001/src/images/SkImageDecoder_libjpeg.cpp#newcode939 src/images/SkImageDecoder_libjpeg.cpp:939: // Seems like jpeg_start_decompress is updating our opinion of ...
5 years ago (2015-12-21 22:35:57 UTC) #22
mtklein
5 years ago (2015-12-21 23:44:52 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/1010983004/diff/60001/src/images/SkImageDecod...
File src/images/SkImageDecoder_libjpeg.cpp (right):

https://codereview.chromium.org/1010983004/diff/60001/src/images/SkImageDecod...
src/images/SkImageDecoder_libjpeg.cpp:939: // Seems like jpeg_start_decompress
is updating our opinion of whether cinfo represents YUV.
On 2015/12/21 22:35:57, msarett wrote:
> Mike, I realize this is a shot in the dark, but is there any chance you know
> what failure/test image caused this code to be added?  We should be able to to
> tell whether YUV is supported before calling jpeg_start_decompress().
> 
> My guess is that "info.comps_in_scan" is a bogus thing to check.  And the only
> thing that jpeg_start_decompress() might change.  What we really want to know
is
> whether the image is multi-scan (progressive) or not.  It doesn't look like we
> support multi-scan images.
> 
> But it would be nice to confirm.

Not sure what image triggered this, but I'm pretty sure I put it right here
because the assert at the beginning of output_raw_data (the next call) was
triggering.  We could try removing it and see what goes wrong?

Powered by Google App Engine
This is Rietveld 408576698