Chromium Code Reviews| Index: src/codec/SkCodec_libgif.cpp |
| diff --git a/src/codec/SkCodec_libgif.cpp b/src/codec/SkCodec_libgif.cpp |
| index e6d1141669b69ee122053a61b80bcf643b54b6ea..6134e96337a4dc3761e3cec6e42a45b168843e06 100644 |
| --- a/src/codec/SkCodec_libgif.cpp |
| +++ b/src/codec/SkCodec_libgif.cpp |
| @@ -9,7 +9,6 @@ |
| #include "SkCodecPriv.h" |
| #include "SkColorPriv.h" |
| #include "SkColorTable.h" |
| -#include "SkScaledCodec.h" |
| #include "SkStream.h" |
| #include "SkSwizzler.h" |
| #include "SkUtils.h" |
| @@ -485,7 +484,7 @@ SkCodec::Result SkGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, |
| ZeroInitialized zeroInit) { |
| const SkPMColor* colorPtr = get_color_ptr(fColorTable.get()); |
| fSwizzler.reset(SkSwizzler::CreateSwizzler(SkSwizzler::kIndex, |
| - colorPtr, dstInfo, zeroInit, this->getInfo())); |
| + colorPtr, dstInfo, zeroInit)); |
| if (nullptr != fSwizzler.get()) { |
| return kSuccess; |
| } |
| @@ -585,20 +584,9 @@ SkCodec::Result SkGifCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, |
| return result; |
| } |
| - // Check to see if scaling was requested. |
| - if (dstInfo.dimensions() != this->getInfo().dimensions()) { |
| - if (!SkScaledCodec::DimensionsSupportedForSampling(this->getInfo(), dstInfo)) { |
| - return gif_error("Scaling not supported.\n", SkCodec::kInvalidScale); |
| - } |
| - } |
| - |
| // Initialize the swizzler |
| if (fFrameIsSubset) { |
| - int sampleX; |
| - SkScaledCodec::ComputeSampleSize(dstInfo, this->getInfo(), &sampleX, NULL); |
| - const SkImageInfo subsetDstInfo = dstInfo.makeWH( |
| - get_scaled_dimension(fFrameDims.width(), sampleX), |
| - fFrameDims.height()); |
| + const SkImageInfo subsetDstInfo = dstInfo.makeWH(fFrameDims.width(), fFrameDims.height()); |
|
msarett
2015/10/01 19:34:33
Glad we don't have to do that any more. Do you ha
scroggo
2015/10/01 21:16:57
Yes, I want one. I have not made or found one thou
|
| if (kSuccess != this->initializeSwizzler(subsetDstInfo, opts.fZeroInitialized)) { |
| return gif_error("Could not initialize swizzler.\n", kUnimplemented); |
| } |