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:
parent
1978ce22eb
commit
a9ef92a5ed
@ -191,15 +191,9 @@ private:
|
||||
, fBitsPerComponent(bitsPerComponent)
|
||||
{}
|
||||
|
||||
void setColor(Color color) {
|
||||
fColor = color;
|
||||
}
|
||||
|
||||
Color fColor;
|
||||
Alpha fAlpha;
|
||||
uint8_t fBitsPerComponent;
|
||||
|
||||
friend class SkJpegCodec;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user