diff options
author | benjaminwagner <benjaminwagner@google.com> | 2015-10-27 09:14:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-27 09:14:29 -0700 |
commit | aada3e802d1373098d574beb79be7f1616fb1e4d (patch) | |
tree | bf32ef00cb6626dda0269a8a15e55bfe0cfc967f | |
parent | 13dd023882d675cf0f728a8037858a05858397b8 (diff) |
Remove SkJpegCodec.cpp from Google3 BUILD due to differing libjpeg_turbo versions.
BUG=skia:4520
Review URL: https://codereview.chromium.org/1418423008
-rw-r--r-- | BUILD.public | 1 | ||||
-rw-r--r-- | src/codec/SkCodec.cpp | 4 | ||||
-rw-r--r-- | src/codec/SkJpegCodec.cpp | 20 |
3 files changed, 5 insertions, 20 deletions
diff --git a/BUILD.public b/BUILD.public index 90526b18a9..a2c31630d2 100644 --- a/BUILD.public +++ b/BUILD.public @@ -48,6 +48,7 @@ SRCS = glob( "src/gpu/gl/GrGLDefaultInterface_none.cpp", # Exclude files that don't compile with the current DEFINES. + "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch. "src/gpu/gl/angle/*", # Requires SK_ANGLE define. "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE' "src/gpu/gl/mesa/*", # Requires SK_MESA define. diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp index 56f6a8de9e..0c6c95ae2d 100644 --- a/src/codec/SkCodec.cpp +++ b/src/codec/SkCodec.cpp @@ -13,7 +13,7 @@ #include "SkCodec_libpng.h" #include "SkCodec_wbmp.h" #include "SkCodecPriv.h" -#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK +#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && !defined(GOOGLE3) #include "SkJpegCodec.h" #endif #include "SkStream.h" @@ -26,7 +26,7 @@ struct DecoderProc { static const DecoderProc gDecoderProcs[] = { { SkPngCodec::IsPng, SkPngCodec::NewFromStream }, -#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK +#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && !defined(GOOGLE3) { SkJpegCodec::IsJpeg, SkJpegCodec::NewFromStream }, #endif { SkWebpCodec::IsWebp, SkWebpCodec::NewFromStream }, diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index 6850a77825..6e2fc84ec8 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 } } |