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

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

Issue 1236953002: Roll Skia to 7b971f0152299ae9a924252a9bfd220318497bdd (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: now with less crash on startup Created 5 years, 5 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') | sky/engine/platform/graphics/Path.cpp » ('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 72be8ef6b6ffdc9c88818a2cae526605ab3584f3..25d355968b7769f0b1d589959d8747be3f80dc45 100644
--- a/sky/engine/platform/graphics/DecodingImageGenerator.cpp
+++ b/sky/engine/platform/graphics/DecodingImageGenerator.cpp
@@ -34,8 +34,8 @@
namespace blink {
DecodingImageGenerator::DecodingImageGenerator(PassRefPtr<ImageFrameGenerator> frameGenerator, const SkImageInfo& info, size_t index)
- : m_frameGenerator(frameGenerator)
- , m_imageInfo(info)
+ : SkImageGenerator(info)
+ , m_frameGenerator(frameGenerator)
, m_frameIndex(index)
, m_generationId(0)
{
@@ -58,24 +58,18 @@ SkData* DecodingImageGenerator::onRefEncodedData()
return 0;
}
-bool DecodingImageGenerator::onGetInfo(SkImageInfo* info)
-{
- *info = m_imageInfo;
- return true;
-}
-
-SkImageGenerator::Result 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, const Options& options, SkPMColor ctable[], int* ctableCount)
{
TRACE_EVENT1("blink", "DecodingImageGenerator::getPixels", "index", static_cast<int>(m_frameIndex));
// Implementation doesn't support scaling yet so make sure we're not given a different size.
- if (info.width() != m_imageInfo.width() || info.height() != m_imageInfo.height() || info.colorType() != m_imageInfo.colorType()) {
+ 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;
}
- bool decoded = m_frameGenerator->decodeAndScale(m_imageInfo, m_frameIndex, pixels, rowBytes);
+ bool decoded = m_frameGenerator->decodeAndScale(info, m_frameIndex, pixels, rowBytes);
return decoded ? Result::kSuccess : Result::kInvalidInput;
}
« no previous file with comments | « sky/engine/platform/graphics/DecodingImageGenerator.h ('k') | sky/engine/platform/graphics/Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698