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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 2025713003: SkEncodedInfo: simplify (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/codec/SkEncodedInfo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.cpp
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index 5d24694708ad99fcc8284ee4b18351f2635023ad..85de356118ccda95e314c7b2ec7376100bb6684b 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -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;
« no previous file with comments | « include/codec/SkEncodedInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698