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

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 1418423008: Remove SkJpegCodec.cpp from Google3 BUILD due to differing libjpeg_turbo versions. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 2 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 | « src/codec/SkCodec.cpp ('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 6850a7782512aa0cc731982c7fb3cff61c93b0ec..6e2fc84ec8b58983bdc2b5ff5311171149f862f9 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -87,11 +87,7 @@ SkJpegCodec::SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream,
* Return the row bytes of a particular image type and width
*/
static int get_row_bytes(const j_decompress_ptr dinfo) {
-#if defined (GOOGLE3)
- int colorBytes = dinfo->out_color_components;
-#else
int colorBytes = (dinfo->out_color_space == JCS_RGB565) ? 2 : dinfo->out_color_components;
-#endif
return dinfo->output_width * colorBytes;
}
@@ -187,14 +183,10 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) {
} else {
// Check the byte ordering of the RGBA color space for the
// current platform
-#if defined(GOOGLE3)
- return false;
-#else
- #if defined(SK_PMCOLOR_IS_RGBA)
+#if defined(SK_PMCOLOR_IS_RGBA)
fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA;
- #else
+#else
fDecoderMgr->dinfo()->out_color_space = JCS_EXT_BGRA;
- #endif
#endif
}
return true;
@@ -202,12 +194,8 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) {
if (isCMYK) {
fDecoderMgr->dinfo()->out_color_space = JCS_CMYK;
} else {
-#if defined(GOOGLE3)
- return false;
-#else
fDecoderMgr->dinfo()->dither_mode = JDITHER_NONE;
fDecoderMgr->dinfo()->out_color_space = JCS_RGB565;
-#endif
}
return true;
case kGray_8_SkColorType:
@@ -358,11 +346,7 @@ void SkJpegCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options&
break;
default:
// This function should only be called if the colorType is supported by jpeg
-#if defined(GOOGLE3)
- SK_CRASH();
-#else
SkASSERT(false);
-#endif
}
}
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698