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

Issue 1010903003: Add scanline decoding to SkCodec. (Closed)

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

Description

Add scanline decoding to SkCodec. Add an interface for decoding scanlines, and implement that interface in the PNG decoder. Use a separate method to determine whether an image that used a type with alpha was actually opaque. SkScanlineDecoder.h: New interface for decoding scanlines. SkCodec.h: Add getScanlineDecoder. Add a virtual function (with non-virtual caller) for determining whether the image truly had alpha. The client can call this to determine if the image was actually opaque if it reported having alpha. Remove code to sneakily change the passed in alpha type. SkCodec_libpng.*: Split up code onGetPixels into helper functions that can be shared with the scanline decoder. Implement scanline decoding. Implement onReallyHasAlpha. SkSwizzler.*: Add a new SrcConfig as a default, which is invalid. Add a function for setting fDstRow directly. Assert fDstRow is not NULL. BUG=skia:3257 Committed: https://skia.googlesource.com/skia/+/05245900bf6d49068b1668da1b38890a41e09bc5

Patch Set 1 #

Patch Set 2 : Small fixes. #

Patch Set 3 : Cleanups #

Total comments: 4

Patch Set 4 : Rebase #

Patch Set 5 : Call IsOpaque #

Patch Set 6 : Actually draw the bitmap after decoding it in DM. #

Patch Set 7 : getOriginalInfo -> getInfo. #

Patch Set 8 : SkCodec owns the SkScanlineDecoder. #

Patch Set 9 : Only support the N line scanline getter. #

Patch Set 10 : Remove subset scanline decoding. #

Patch Set 11 : Small cleanups. #

Total comments: 2

Patch Set 12 : Clarify getScanlineDecoder comment. #

Patch Set 13 : Remove the need to call finish. #

Patch Set 14 : Add an explanation for why we don't return kSuccess. #

Patch Set 15 : Add FIXMEs for reallyHasAlpha. #

Patch Set 16 : Remove testing only changes. #

Total comments: 6

Patch Set 17 : Respond to Derek's comments on patch set 16 #

Patch Set 18 : Rebase #

Patch Set 19 : Finish rebase #

Patch Set 20 : Prevent clobber error. #

Total comments: 1

Patch Set 21 : Try number two... #

Patch Set 22 : Build with no-clobbered #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -81 lines) Patch
M gyp/codec.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +5 lines, -0 lines 0 comments Download
M include/codec/SkCodec.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +57 lines, -3 lines 0 comments Download
A include/codec/SkScanlineDecoder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +115 lines, -0 lines 0 comments Download
M src/codec/SkCodec.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +9 lines, -0 lines 0 comments Download
M src/codec/SkCodec_libpng.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +24 lines, -4 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 10 chunks +162 lines, -73 lines 0 comments Download
M src/codec/SkSwizzler.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M src/codec/SkSwizzler.cpp View 1 2 3 3 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 27 (9 generated)
scroggo
https://codereview.chromium.org/1010903003/diff/40001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1010903003/diff/40001/include/codec/SkCodec.h#newcode72 include/codec/SkCodec.h:72: const SkIRect* origSubset = NULL); I haven't yet handled ...
5 years, 9 months ago (2015-03-18 20:19:06 UTC) #2
reed1
https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp File src/codec/SkCodec_libpng.cpp (right): https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp#newcode514 src/codec/SkCodec_libpng.cpp:514: SkImageGenerator::Result onGetNextScanline(void* dst) SK_OVERRIDE { Is it easy to ...
5 years, 9 months ago (2015-03-19 15:31:39 UTC) #3
scroggo
https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp File src/codec/SkCodec_libpng.cpp (right): https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp#newcode514 src/codec/SkCodec_libpng.cpp:514: SkImageGenerator::Result onGetNextScanline(void* dst) SK_OVERRIDE { On 2015/03/19 15:31:39, reed1 ...
5 years, 9 months ago (2015-03-19 17:59:19 UTC) #4
scroggo
On 2015/03/19 17:59:19, scroggo wrote: > https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp > File src/codec/SkCodec_libpng.cpp (right): > > https://codereview.chromium.org/1010903003/diff/40001/src/codec/SkCodec_libpng.cpp#newcode514 > ...
5 years, 9 months ago (2015-03-24 15:10:39 UTC) #5
reed1
https://codereview.chromium.org/1010903003/diff/200001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1010903003/diff/200001/include/codec/SkCodec.h#newcode75 include/codec/SkCodec.h:75: SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo); 1. Create a new scanline ...
5 years, 9 months ago (2015-03-24 15:45:20 UTC) #6
scroggo
https://codereview.chromium.org/1010903003/diff/200001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1010903003/diff/200001/include/codec/SkCodec.h#newcode75 include/codec/SkCodec.h:75: SkScanlineDecoder* getScanlineDecoder(const SkImageInfo& dstInfo); On 2015/03/24 15:45:20, reed1 wrote: ...
5 years, 9 months ago (2015-03-24 16:55:47 UTC) #7
reed1
api lgtm w/ ... Can we get ride of reallyHasAlpha by ... 1. deciding its ...
5 years, 9 months ago (2015-03-24 17:16:35 UTC) #8
scroggo
On 2015/03/24 17:16:35, reed1 wrote: > api lgtm w/ ... > > Can we get ...
5 years, 9 months ago (2015-03-24 21:28:53 UTC) #9
djsollen
looking pretty good! https://codereview.chromium.org/1010903003/diff/300001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1010903003/diff/300001/include/codec/SkCodec.h#newcode67 include/codec/SkCodec.h:67: * Calling a second time will ...
5 years, 9 months ago (2015-03-25 13:08:42 UTC) #10
scroggo
https://codereview.chromium.org/1010903003/diff/300001/include/codec/SkCodec.h File include/codec/SkCodec.h (right): https://codereview.chromium.org/1010903003/diff/300001/include/codec/SkCodec.h#newcode67 include/codec/SkCodec.h:67: * Calling a second time will rewind and replace ...
5 years, 9 months ago (2015-03-25 13:49:15 UTC) #11
djsollen
lgtm
5 years, 9 months ago (2015-03-25 14:13:29 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010903003/320001
5 years, 9 months ago (2015-03-25 14:14:07 UTC) #15
commit-bot: I haz the power
Failed to apply patch for src/codec/SkCodec_libpng.cpp: While running git apply --index -3 -p1; error: patch ...
5 years, 9 months ago (2015-03-25 14:14:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010903003/360001
5 years, 9 months ago (2015-03-25 14:27:22 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-Trybot/builds/105)
5 years, 9 months ago (2015-03-25 14:28:33 UTC) #22
scroggo
https://codereview.chromium.org/1010903003/diff/380001/src/codec/SkCodec_libpng.cpp File src/codec/SkCodec_libpng.cpp (right): https://codereview.chromium.org/1010903003/diff/380001/src/codec/SkCodec_libpng.cpp#newcode512 src/codec/SkCodec_libpng.cpp:512: // Using this local variable will prevent the clobber ...
5 years, 9 months ago (2015-03-25 15:55:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010903003/420001
5 years, 9 months ago (2015-03-25 17:37:15 UTC) #26
commit-bot: I haz the power
5 years, 9 months ago (2015-03-25 18:11:57 UTC) #27
Message was sent while issue was closed.
Committed patchset #22 (id:420001) as
https://skia.googlesource.com/skia/+/05245900bf6d49068b1668da1b38890a41e09bc5

Powered by Google App Engine
This is Rietveld 408576698