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

Issue 1277213002: Support more swizzles to 565 in SkCodec (Closed)

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

Description

Support more swizzles to 565 in SkCodec Add more swizzling functions for swizzling to 565. Much of this code was revived from crrev.com/1055743003 (for BMP). Also added swizzling functions for WBMP. Consolidate the static function conversion_possible. In SkCodec::getPixels, check that the alphatype corresponds to the colorType. This prevents requesting 565 + non-opaque. In SkIcoCodec, report that the image is unpremul (instead of whatever the largest embedded codec thinks), but modify the requested info to have the alpha type expected/required by the embedded codec. Add tests for decoding to 565. BUG=skia:3257 BUG=skia:3683 Committed: https://skia.googlesource.com/skia/+/cc2feb161f756c4035a407296567654d86bc7be7

Patch Set 1 #

Patch Set 2 : Fix parameters for row proc #

Patch Set 3 : Support more #

Total comments: 10

Patch Set 4 : Respond to Matt's comments in patch set 3 #

Patch Set 5 : Fix out of bounds write #

Patch Set 6 : Fixes for ICO #

Patch Set 7 : Support wbmp, add tests #

Total comments: 3

Patch Set 8 : Rebase on top of SkScaledCodec #

Patch Set 9 : Update new 565 swizzling functions for scaling #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -154 lines) Patch
M dm/DM.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M dm/DMSrcSink.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M src/codec/SkBmpCodec.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/codec/SkBmpMaskCodec.cpp View 1 2 3 4 1 chunk +0 lines, -27 lines 0 comments Download
M src/codec/SkBmpRLECodec.cpp View 1 2 3 4 3 chunks +10 lines, -29 lines 0 comments Download
M src/codec/SkBmpStandardCodec.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -29 lines 0 comments Download
M src/codec/SkCodec.cpp View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M src/codec/SkCodecPriv.h View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M src/codec/SkCodec_libgif.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -24 lines 0 comments Download
M src/codec/SkCodec_libico.cpp View 1 2 3 4 5 2 chunks +22 lines, -4 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -22 lines 0 comments Download
M src/codec/SkCodec_wbmp.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M src/codec/SkMaskSwizzler.cpp View 1 2 3 6 chunks +75 lines, -0 lines 0 comments Download
M src/codec/SkSwizzler.cpp View 1 2 3 4 5 6 7 8 6 chunks +73 lines, -0 lines 2 comments Download
M src/codec/SkWebpCodec.cpp View 1 2 3 4 3 chunks +12 lines, -13 lines 0 comments Download
M tests/CodexTest.cpp View 1 2 3 4 5 6 3 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
scroggo_chromium
https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkCodecPriv.h File src/codec/SkCodecPriv.h (right): https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkCodecPriv.h#newcode63 src/codec/SkCodecPriv.h:63: static bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) { ...
5 years, 4 months ago (2015-08-10 17:26:16 UTC) #2
msarett
https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkCodecPriv.h File src/codec/SkCodecPriv.h (right): https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkCodecPriv.h#newcode63 src/codec/SkCodecPriv.h:63: static bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) { ...
5 years, 4 months ago (2015-08-10 17:44:24 UTC) #3
scroggo
https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkMaskSwizzler.cpp File src/codec/SkMaskSwizzler.cpp (right): https://codereview.chromium.org/1277213002/diff/40001/src/codec/SkMaskSwizzler.cpp#newcode66 src/codec/SkMaskSwizzler.cpp:66: static SkSwizzler::ResultAlpha swizzle_mask16_to_565( On 2015/08/10 17:44:24, msarett wrote: > ...
5 years, 4 months ago (2015-08-10 17:50:46 UTC) #5
msarett
lgtm
5 years, 4 months ago (2015-08-11 12:35:42 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1277213002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1277213002/60001
5 years, 4 months ago (2015-08-12 14:15:56 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/2524)
5 years, 4 months ago (2015-08-12 14:20:00 UTC) #10
scroggo
I had to fix an ICO problem (out of bounds write when decoding to 565), ...
5 years, 4 months ago (2015-08-13 14:45:05 UTC) #11
msarett
lgtm I'll spend some time attacking those FIXMEs.
5 years, 4 months ago (2015-08-13 14:56:31 UTC) #12
scroggo
More changes, to add tests and support wbmp to 565 https://codereview.chromium.org/1277213002/diff/120001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1277213002/diff/120001/src/codec/SkSwizzler.cpp#newcode118 ...
5 years, 4 months ago (2015-08-13 18:09:43 UTC) #13
msarett
https://codereview.chromium.org/1277213002/diff/120001/tests/CodexTest.cpp File tests/CodexTest.cpp (right): https://codereview.chromium.org/1277213002/diff/120001/tests/CodexTest.cpp#newcode82 tests/CodexTest.cpp:82: bool supports565 = true) { On 2015/08/13 18:09:43, scroggo ...
5 years, 4 months ago (2015-08-13 18:16:18 UTC) #14
scroggo_chromium
Please take one final look at this CL before I land. After a rebase, only ...
5 years, 4 months ago (2015-08-14 15:17:23 UTC) #15
msarett
lgtm https://codereview.chromium.org/1277213002/diff/160001/src/codec/SkSwizzler.cpp File src/codec/SkSwizzler.cpp (right): https://codereview.chromium.org/1277213002/diff/160001/src/codec/SkSwizzler.cpp#newcode130 src/codec/SkSwizzler.cpp:130: dst[0] = ((currByte >> (7 - bitIndex)) & ...
5 years, 4 months ago (2015-08-14 15:21:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1277213002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1277213002/160001
5 years, 4 months ago (2015-08-14 15:25:54 UTC) #18
commit-bot: I haz the power
5 years, 4 months ago (2015-08-14 15:32:49 UTC) #19
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://skia.googlesource.com/skia/+/cc2feb161f756c4035a407296567654d86bc7be7

Powered by Google App Engine
This is Rietveld 408576698