SkEncodedInfo: simplify

No public API change.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2025713003

Review-Url: https://codereview.chromium.org/2025713003
This commit is contained in:
halcanary 2016-05-31 10:57:36 -07:00 committed by Commit bot
parent 1978ce22eb
commit a9ef92a5ed
2 changed files with 6 additions and 8 deletions

View File

@ -191,15 +191,9 @@ private:
, fBitsPerComponent(bitsPerComponent)
{}
void setColor(Color color) {
fColor = color;
}
Color fColor;
Alpha fAlpha;
uint8_t fBitsPerComponent;
friend class SkJpegCodec;
};
#endif

View File

@ -526,11 +526,15 @@ void SkJpegCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options&
switch (fDecoderMgr->dinfo()->out_color_space) {
case JCS_RGB:
preSwizzled = false;
swizzlerInfo.setColor(SkEncodedInfo::kRGB_Color);
swizzlerInfo = SkEncodedInfo::Make(SkEncodedInfo::kRGB_Color,
swizzlerInfo.alpha(),
swizzlerInfo.bitsPerComponent());
break;
case JCS_CMYK:
preSwizzled = false;
swizzlerInfo.setColor(SkEncodedInfo::kInvertedCMYK_Color);
swizzlerInfo = SkEncodedInfo::Make(
SkEncodedInfo::kInvertedCMYK_Color, swizzlerInfo.alpha(),
swizzlerInfo.bitsPerComponent());
break;
default:
break;