DescriptionMove 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
Patch Set 1 #Patch Set 2 : Appears to fix bugs. Need to clean up and rebase. #Patch Set 3 : Cleanups #Patch Set 4 : Rebase onto master #Patch Set 5 : Fix ico, sampling #
Total comments: 35
Patch Set 6 : Remove redundant dimensions check in wbmp #Patch Set 7 : Respond to Matt's comments in patch set 5 #Patch Set 8 : Attempted fix for BmpRLE; use the return value from setSampleX #Patch Set 9 : Fix BmpRLE #Patch Set 10 : Fix warnings #Patch Set 11 : Fix final BMP subclass #Patch Set 12 : Attempt to fix RLE overflow #
Created: 5 years, 2 months ago
Messages
Total messages: 24 (11 generated)
|