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

Issue 1258863008: Split SkBmpCodec into three separate classes (Closed)

Created:
5 years, 4 months ago by msarett
Modified:
5 years, 4 months ago
Reviewers:
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

Split SkBmpCodec into three separate classes Will regress behavior on gold on test32bfv4.bmp, where we will no longer fix transparent decodes. TODO: Start fixing transparent decodes again, or decide that we don't want to fix them and remove isTransparent from SkSwizzler. I think this may become more clear when I start implementing the scanline decoder. BUG=skia: Committed: https://skia.googlesource.com/skia/+/4ab9d5f1bc6d05c49dc765c3de5ade816f4c968e

Patch Set 1 : #

Total comments: 47

Patch Set 2 : SkBmpCodec is a parent class of the bmp codecs #

Total comments: 41

Patch Set 3 : Responses to comments #

Patch Set 4 : Remove code to fix transparent decodes #

Total comments: 12

Patch Set 5 : #

Total comments: 1

Patch Set 6 : Rebase #

Patch Set 7 : Fix rebase #

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1340 lines, -955 lines) Patch
M gyp/codec.gyp View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/codec/SkBmpCodec.h View 1 2 3 4 3 chunks +30 lines, -118 lines 0 comments Download
M src/codec/SkBmpCodec.cpp View 1 2 3 4 5 6 7 20 chunks +137 lines, -799 lines 0 comments Download
A src/codec/SkBmpMaskCodec.h View 1 2 3 1 chunk +52 lines, -0 lines 0 comments Download
A src/codec/SkBmpMaskCodec.cpp View 1 2 3 4 1 chunk +137 lines, -0 lines 0 comments Download
A src/codec/SkBmpRLECodec.h View 1 2 3 4 1 chunk +86 lines, -0 lines 0 comments Download
A src/codec/SkBmpRLECodec.cpp View 1 2 3 4 1 chunk +430 lines, -0 lines 0 comments Download
A src/codec/SkBmpStandardCodec.h View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download
A src/codec/SkBmpStandardCodec.cpp View 1 2 3 4 5 6 7 8 1 chunk +361 lines, -0 lines 0 comments Download
M src/codec/SkCodecPriv.h View 1 2 3 4 5 5 chunks +22 lines, -13 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 1 2 3 4 5 1 chunk +4 lines, -17 lines 0 comments Download
M src/codec/SkMaskSwizzler.h View 3 chunks +4 lines, -8 lines 0 comments Download
M src/codec/SkMasks.h View 2 chunks +5 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 37 (18 generated)
msarett
One relevant response to a comment from 1249973003: "I believe these are subclasses? It seems ...
5 years, 4 months ago (2015-07-30 19:24:46 UTC) #4
scroggo
Is any of this code new? I think FixTransparentDecode is a new method, but I ...
5 years, 4 months ago (2015-07-31 15:05:44 UTC) #5
msarett
"Is any of this code new? I think FixTransparentDecode is a new method, but I ...
5 years, 4 months ago (2015-08-03 22:52:36 UTC) #7
scroggo
https://codereview.chromium.org/1258863008/diff/40001/src/codec/SkBmpMaskCodec.h File src/codec/SkBmpMaskCodec.h (right): https://codereview.chromium.org/1258863008/diff/40001/src/codec/SkBmpMaskCodec.h#newcode13 src/codec/SkBmpMaskCodec.h:13: #include "SkStream.h" On 2015/08/03 22:52:35, msarett wrote: > On ...
5 years, 4 months ago (2015-08-04 16:16:47 UTC) #8
msarett
I want to talk in person about the issues with FixTransparentDecode, but here's the latest ...
5 years, 4 months ago (2015-08-04 23:14:45 UTC) #9
msarett
Removing all the FixTransparentDecode stuff. I think it makes more sense to break up these ...
5 years, 4 months ago (2015-08-05 17:47:13 UTC) #10
scroggo
lgtm https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.cpp File src/codec/SkBmpCodec.cpp (right): https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.cpp#newcode481 src/codec/SkBmpCodec.cpp:481: return false; Is it possible to reach here? ...
5 years, 4 months ago (2015-08-06 21:12:41 UTC) #11
msarett
https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.cpp File src/codec/SkBmpCodec.cpp (right): https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.cpp#newcode481 src/codec/SkBmpCodec.cpp:481: return false; On 2015/08/06 21:12:41, scroggo wrote: > Is ...
5 years, 4 months ago (2015-08-06 21:41:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258863008/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258863008/140001
5 years, 4 months ago (2015-08-06 21:42:02 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/2440) Build-Ubuntu-GCC-Mips-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 4 months ago (2015-08-06 21:42:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258863008/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258863008/160001
5 years, 4 months ago (2015-08-06 21:51:01 UTC) #20
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/2453) Build-Mac10.8-Clang-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 4 months ago (2015-08-06 21:52:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258863008/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258863008/170001
5 years, 4 months ago (2015-08-06 21:59:10 UTC) #25
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/2455)
5 years, 4 months ago (2015-08-06 22:01:42 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258863008/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258863008/190001
5 years, 4 months ago (2015-08-06 22:21:59 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-Debug-Trybot/builds/2511) Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, ...
5 years, 4 months ago (2015-08-06 22:25:15 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258863008/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258863008/210001
5 years, 4 months ago (2015-08-06 22:27:22 UTC) #35
commit-bot: I haz the power
Committed patchset #9 (id:210001) as https://skia.googlesource.com/skia/+/4ab9d5f1bc6d05c49dc765c3de5ade816f4c968e
5 years, 4 months ago (2015-08-06 22:34:48 UTC) #36
scroggo
5 years, 4 months ago (2015-08-07 13:20:36 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.cpp
File src/codec/SkBmpCodec.cpp (right):

https://codereview.chromium.org/1258863008/diff/120001/src/codec/SkBmpCodec.c...
src/codec/SkBmpCodec.cpp:481: return false;
On 2015/08/06 21:41:42, msarett wrote:
> On 2015/08/06 21:12:41, scroggo wrote:
> > Is it possible to reach here? If not, this can be SkASSERT(!inIco)
> 
> I do think these are reachable.  Not having these checks before was a bug, I
> believe.

It would be nice to verify that (bonus points for a test!)

https://codereview.chromium.org/1258863008/diff/140001/src/codec/SkBmpCodec.cpp
File src/codec/SkBmpCodec.cpp (right):

https://codereview.chromium.org/1258863008/diff/140001/src/codec/SkBmpCodec.c...
src/codec/SkBmpCodec.cpp:565: // Also set fNumColors to maxColors when it is too
large
nit: fNumColors -> numColors.

Powered by Google App Engine
This is Rietveld 408576698