Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: sky/engine/platform/graphics/DecodingImageGenerator.cpp

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/platform/graphics/DecodingImageGenerator.h ('k') | testing/android/native_test.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/graphics/DecodingImageGenerator.cpp
diff --git a/sky/engine/platform/graphics/DecodingImageGenerator.cpp b/sky/engine/platform/graphics/DecodingImageGenerator.cpp
index 599e77c51be3b986389a910d48a71da3cea75386..f2e152c17ba20936537798cb081149911cdec20c 100644
--- a/sky/engine/platform/graphics/DecodingImageGenerator.cpp
+++ b/sky/engine/platform/graphics/DecodingImageGenerator.cpp
@@ -65,7 +65,7 @@ bool DecodingImageGenerator::onGetInfo(SkImageInfo* info)
return true;
}
-bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount)
+SkImageGenerator::Result DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount)
{
TRACE_EVENT1("blink", "DecodingImageGenerator::getPixels", "index", static_cast<int>(m_frameIndex));
@@ -73,11 +73,11 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels,
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 false;
+ return Result::kInvalidScale;
}
bool decoded = m_frameGenerator->decodeAndScale(m_imageInfo, m_frameIndex, pixels, rowBytes);
- return decoded;
+ return decoded ? Result::kSuccess : Result::kInvalidInput;
}
bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3])
« no previous file with comments | « sky/engine/platform/graphics/DecodingImageGenerator.h ('k') | testing/android/native_test.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698