commit | 91c22b2ea6bd13a31321ead01645467f21858cd0 | [log] [tgz] |
---|---|---|
author | msarett <msarett@google.com> | Mon Feb 22 12:27:46 2016 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Mon Feb 22 12:27:46 2016 -0800 |
tree | 99f66c26c87bbcade9c7eac84099e2fae7c01cd5 | |
parent | 7499e69d9991a113c452a2a44a10078df41f3758 [diff] [blame] |
Use new jpeg_crop_scanlines() API to optimize jpeg subset decodes This was adapted from: https://codereview.chromium.org/1530933003 Subset Decode Runtime (Original / Optimized) on Nexus 6P TopLeft 0.51x TopRight 0.56x Middle 0.71x BottomLeft 0.79x BottomRight 0.79x BUG=skia:4256 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1719073002 Review URL: https://codereview.chromium.org/1719073002
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h index 06685cf..bb5ce75 100644 --- a/src/codec/SkJpegCodec.h +++ b/src/codec/SkJpegCodec.h
@@ -115,6 +115,10 @@ // scanline decoding SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed uint8_t* fSrcRow; // Only used if sampling is needed + // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo + // cannot take the exact the subset that we need, we will use the swizzler + // to further subset the output from libjpeg-turbo. + SkIRect fSwizzlerSubset; SkAutoTDelete<SkSwizzler> fSwizzler; typedef SkCodec INHERITED;