|
Move all knowledge of X sampling into SkScaledCodec
Prior to this CL, each SkCodec subclass that allows sampling does an
extra check in onStartScanlineDecode to determine whether the X dimension
is supported for sampling. Remove this check, and provide a way for
SkScaledCodec to directly access the SkSwizzler, and update it to do
sampling. This way, the SkCodec knows nothing of sampling, but we can
still save the extra step of sampling afterwards.
FIXME: SkBmpRLECodec still calls SkScaledCodec::DimensionsSupported. It
seems like it could directly support sampling, rather than dealing with
SkScaledCodec (partially).
Add a new base class for SkSwizzler. It allows updating the swizzler
after it was created, which is done by SkScaledCodec. Modify SkSwizzler's
constructor/factory function to stop taking any info about sampling,
assume the sample size is one, and move modifying that into a virtual
function overridden from the base class.
BUG= skia:4284
Committed: https://skia.googlesource.com/skia/+/e7fc14b55bb8c41ba054abf0bfa09cdd6ec84671
Total comments: 35
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+363 lines, -248 lines) |
Patch |
|
M |
include/codec/SkCodec.h
|
View
|
1
2
3
|
4 chunks |
+35 lines, -0 lines |
0 comments
|
Download
|
|
M |
include/codec/SkScaledCodec.h
|
View
|
1
2
|
2 chunks |
+2 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpCodec.h
|
View
|
1
2
3
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/codec/SkBmpCodec.cpp
|
View
|
1
2
3
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpMaskCodec.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpRLECodec.h
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpRLECodec.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
6 chunks |
+38 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpStandardCodec.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkBmpStandardCodec.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/codec/SkCodec.cpp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+28 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libgif.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libgif.cpp
|
View
|
1
2
3
|
3 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libico.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libico.cpp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+14 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libpng.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_libpng.cpp
|
View
|
1
2
3
|
4 chunks |
+4 lines, -21 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_wbmp.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkCodec_wbmp.cpp
|
View
|
1
2
3
4
5
|
5 chunks |
+3 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/codec/SkJpegCodec.h
|
View
|
1
2
3
|
2 chunks |
+3 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/codec/SkJpegCodec.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
7 chunks |
+60 lines, -49 lines |
0 comments
|
Download
|
|
M |
src/codec/SkMaskSwizzler.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+14 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/codec/SkMaskSwizzler.cpp
|
View
|
1
|
3 chunks |
+21 lines, -12 lines |
0 comments
|
Download
|
|
A |
src/codec/SkSampler.h
|
View
|
|
1 chunk |
+27 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkScaledCodec.cpp
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+53 lines, -53 lines |
0 comments
|
Download
|
|
M |
src/codec/SkSwizzler.h
|
View
|
|
3 chunks |
+15 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/codec/SkSwizzler.cpp
|
View
|
|
2 chunks |
+19 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/codec/SkWebpCodec.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/codec/SkWebpCodec.cpp
|
View
|
1
2
3
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
Total messages: 24 (11 generated)
|