diff options
Diffstat (limited to 'src/codec/SkCodecImageGenerator.cpp')
-rw-r--r-- | src/codec/SkCodecImageGenerator.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/codec/SkCodecImageGenerator.cpp b/src/codec/SkCodecImageGenerator.cpp index 0758878146..447332b2c7 100644 --- a/src/codec/SkCodecImageGenerator.cpp +++ b/src/codec/SkCodecImageGenerator.cpp @@ -47,30 +47,6 @@ bool SkCodecImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, s } } -bool SkCodecImageGenerator::onComputeScaledDimensions(SkScalar scale, SupportedSizes* sizes) { - SkASSERT(scale > 0 && scale <= 1); - const auto size = fCodec->getScaledDimensions(SkScalarToFloat(scale)); - if (size == this->getInfo().dimensions()) { - return false; - } - - // FIXME: Make SkCodec's API return two potential sizes, like this one. For now, set them both - // to be the same. - sizes->fSizes[0] = sizes->fSizes[1] = size; - return true; -} - -bool SkCodecImageGenerator::onGenerateScaledPixels(const SkPixmap& pixmap) { - if (pixmap.colorType() == kIndex_8_SkColorType) { - // There is no way to tell the client about the color table with this API. - return false; - } - - return this->onGetPixels(pixmap.info(), pixmap.writable_addr(), pixmap.rowBytes(), - nullptr, nullptr); -} - - bool SkCodecImageGenerator::onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const { return fCodec->queryYUV8(sizeInfo, colorSpace); |