From b3c618b9d8ddaad0dfce4e2cff7782c08d8816e6 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 13 Jul 2015 13:20:23 -0700 Subject: [PATCH] Roll Skia to 2ced78866fcadd98895777c8dffe92e229775181 The Skia rolls will continue until morale improves. New version of SkMemory_new_handler.cpp from Chromium. TBR=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1235863004 . --- engine/platform/graphics/DecodingImageGenerator.cpp | 7 +++---- engine/platform/graphics/DecodingImageGenerator.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/engine/platform/graphics/DecodingImageGenerator.cpp b/engine/platform/graphics/DecodingImageGenerator.cpp index 25d355968..e52fee66e 100644 --- a/engine/platform/graphics/DecodingImageGenerator.cpp +++ b/engine/platform/graphics/DecodingImageGenerator.cpp @@ -58,7 +58,7 @@ SkData* DecodingImageGenerator::onRefEncodedData() return 0; } -SkImageGenerator::Result DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, const Options& options, 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)); @@ -66,11 +66,10 @@ SkImageGenerator::Result DecodingImageGenerator::onGetPixels(const SkImageInfo& if (info.width() != info.width() || info.height() != info.height() || info.colorType() != info.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(info, m_frameIndex, pixels, rowBytes); - return decoded ? Result::kSuccess : Result::kInvalidInput; + return m_frameGenerator->decodeAndScale(info, m_frameIndex, pixels, rowBytes); } 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 c3826be21..07a41acfa 100644 --- a/engine/platform/graphics/DecodingImageGenerator.h +++ b/engine/platform/graphics/DecodingImageGenerator.h @@ -50,7 +50,7 @@ public: protected: virtual SkData* onRefEncodedData() override; - virtual Result onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, const Options& options, 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: -- GitLab