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

Issue 1220733013: SkCodec no longer inherits from SkImageGenerator. (Closed)

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

Description

SkCodec no longer inherits from SkImageGenerator. SkImageGenerator makes some assumptions that are not necessarily valid for SkCodec. For example, SkCodec does not assume that it can always be rewound. We also have an ongoing question of what an SkCodec should report as its default settings (i.e. the return from getInfo). It makes sense for an SkCodec to report that its pixels are unpremultiplied, if that is the case for the underlying data, but if a client of SkImageGenerator uses the default settings (as many do), they will receive unpremultiplied pixels which cannot (currently) be drawn with Skia. We may ultimately decide to revisit SkCodec reporting an SkImageInfo, but I have left it unchanged for now. Import features of SkImageGenerator used by SkCodec into SkCodec. I have left SkImageGenerator unchanged for now, but it no longer needs Result or Options. This will require changes to Chromium. Manually handle the lifetime of fScanlineDecoder, so SkScanlineDecoder.h can include SkCodec.h (where Result is), and SkCodec.h does not need to include it (to delete fScanlineDecoder). In many places, make the following simple changes: - Now include SkScanlineDecoder.h, which is no longer included by SkCodec.h - Use the enums in SkCodec, rather than SkImageGenerator - Stop including SkImageGenerator.h where no longer needed Committed: https://skia.googlesource.com/skia/+/eb602a5c94078fb2956c9bdc64bbf47a31b9c0e5

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : Manually handle the lifetime of fScanlineDecoder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -102 lines) Patch
M bench/CodecBench.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M bench/nanobench.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M bench/subset/SubsetSingleBench.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M bench/subset/SubsetTranslateBench.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M bench/subset/SubsetZoomBench.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M dm/DMSrcSink.cpp View 1 8 chunks +22 lines, -22 lines 0 comments Download
M include/codec/SkCodec.h View 1 2 6 chunks +131 lines, -12 lines 0 comments Download
M include/codec/SkScanlineDecoder.h View 5 chunks +9 lines, -9 lines 0 comments Download
M src/codec/SkCodec.cpp View 1 2 4 chunks +55 lines, -3 lines 0 comments Download
M src/codec/SkCodec_libbmp.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M src/codec/SkCodec_libpng.cpp View 5 chunks +12 lines, -12 lines 0 comments Download
M src/codec/SkCodec_wbmp.cpp View 3 chunks +11 lines, -11 lines 0 comments Download
M src/codec/SkJpegCodec.cpp View 5 chunks +8 lines, -7 lines 0 comments Download
M src/codec/SkSwizzler.h View 1 chunk +1 line, -1 line 0 comments Download
M src/codec/SkSwizzler.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M src/codec/SkWebpCodec.cpp View 3 chunks +3 lines, -5 lines 0 comments Download
M tests/CodexTest.cpp View 5 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
scroggo
Per our discussion last week, this severs ties between SkCodec and SkImageGenerator.
5 years, 5 months ago (2015-07-07 17:17:15 UTC) #2
msarett
lgtm
5 years, 5 months ago (2015-07-07 17:23:51 UTC) #3
reed1
lgtm
5 years, 5 months ago (2015-07-07 20:17:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220733013/1
5 years, 5 months ago (2015-07-09 12:59:50 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/1979)
5 years, 5 months ago (2015-07-09 13:03:20 UTC) #8
scroggo
Patch set 3 (2 was just a rebase) removes fScanlineDecoder from the SkAutoTDelete, since that ...
5 years, 5 months ago (2015-07-09 15:02:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220733013/40001
5 years, 5 months ago (2015-07-09 15:03:39 UTC) #12
commit-bot: I haz the power
5 years, 5 months ago (2015-07-09 15:16:07 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/eb602a5c94078fb2956c9bdc64bbf47a31b9c0e5

Powered by Google App Engine
This is Rietveld 408576698