diff --git a/engine/platform/graphics/DecodingImageGenerator.cpp b/engine/platform/graphics/DecodingImageGenerator.cpp index f2e152c17ba..599e77c51be 100644 --- a/engine/platform/graphics/DecodingImageGenerator.cpp +++ b/engine/platform/graphics/DecodingImageGenerator.cpp @@ -65,7 +65,7 @@ bool DecodingImageGenerator::onGetInfo(SkImageInfo* info) return true; } -SkImageGenerator::Result DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) +bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) { TRACE_EVENT1("blink", "DecodingImageGenerator::getPixels", "index", static_cast(m_frameIndex)); @@ -73,11 +73,11 @@ SkImageGenerator::Result DecodingImageGenerator::onGetPixels(const SkImageInfo& if (info.width() != m_imageInfo.width() || info.height() != m_imageInfo.height() || info.colorType() != m_imageInfo.colorType()) { // ImageFrame may have changed the owning SkBitmap to kOpaque_SkAlphaType after sniffing the encoded data, so if we see a request // for opaque, that is ok even if our initial alphatype was not opaque. - return Result::kInvalidScale; + return false; } bool decoded = m_frameGenerator->decodeAndScale(m_imageInfo, m_frameIndex, pixels, rowBytes); - return decoded ? Result::kSuccess : Result::kInvalidInput; + return decoded; } bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) diff --git a/engine/platform/graphics/DecodingImageGenerator.h b/engine/platform/graphics/DecodingImageGenerator.h index a2e948e5185..3d6ae39db98 100644 --- a/engine/platform/graphics/DecodingImageGenerator.h +++ b/engine/platform/graphics/DecodingImageGenerator.h @@ -51,7 +51,7 @@ public: protected: virtual SkData* onRefEncodedData() override; virtual bool onGetInfo(SkImageInfo*) override; - virtual Result onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) override; + virtual bool onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) override; virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) override; private: