diff options
author | 2015-08-13 11:44:05 -0700 | |
---|---|---|
committer | 2015-08-13 11:44:05 -0700 | |
commit | e5aaa07c351815f023a0842820eb769c6d4b4ed3 (patch) | |
tree | b0ec62be476f4201fa1306c30662df70466761df /src/codec/SkCodec_wbmp.cpp | |
parent | 0944100ac89f797714eeae0cf2875e2335ff52ee (diff) |
Revert of SkScaledCodec class (patchset #32 id:620001 of https://codereview.chromium.org/1260673002/ )
Reason for revert:
Segfaulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1605/steps/dm/logs/stdio
Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1294593002
Diffstat (limited to 'src/codec/SkCodec_wbmp.cpp')
-rw-r--r-- | src/codec/SkCodec_wbmp.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/codec/SkCodec_wbmp.cpp b/src/codec/SkCodec_wbmp.cpp index 3081a3bba9..6f98294fc6 100644 --- a/src/codec/SkCodec_wbmp.cpp +++ b/src/codec/SkCodec_wbmp.cpp @@ -9,7 +9,6 @@ #include "SkCodecPriv.h" #include "SkColorPriv.h" #include "SkColorTable.h" -#include "SkScaledCodec.h" #include "SkStream.h" #include "SkCodec_wbmp.h" @@ -81,8 +80,8 @@ SkSwizzler* SkWbmpCodec::initializeSwizzler(const SkImageInfo& info, case kIndex_8_SkColorType: case kN32_SkColorType: case kGray_8_SkColorType: - return SkSwizzler::CreateSwizzler(SkSwizzler::kBit, ctable, info, opts.fZeroInitialized, - this->getInfo()); + return SkSwizzler::CreateSwizzler( + SkSwizzler::kBit, ctable, info, opts.fZeroInitialized); default: return NULL; } @@ -202,9 +201,7 @@ public: return SkCodec::kUnimplemented; } if (dstInfo.dimensions() != this->getInfo().dimensions()) { - if (!SkScaledCodec::DimensionsSupportedForSampling(this->getInfo(), dstInfo)) { - return SkCodec::kInvalidScale; - } + return SkCodec::kInvalidScale; } if (!valid_alpha(dstInfo.alphaType(), this->getInfo().alphaType())) { @@ -223,16 +220,12 @@ public: fSwizzler.reset(fCodec->initializeSwizzler(dstInfo, get_color_ptr(fColorTable.get()), options)); if (NULL == fSwizzler.get()) { - return SkCodec::kInvalidConversion; + return SkCodec::kInvalidInput; } return SkCodec::kSuccess; } - SkEncodedFormat onGetEncodedFormat() const { - return kWBMP_SkEncodedFormat; - } - private: SkAutoTDelete<SkWbmpCodec> fCodec; SkAutoTUnref<SkColorTable> fColorTable; |