Index: Source/platform/graphics/DecodingImageGenerator.cpp |
diff --git a/Source/platform/graphics/DecodingImageGenerator.cpp b/Source/platform/graphics/DecodingImageGenerator.cpp |
index e74a7fec18d17642e0a0cd5ed04326e26a115b7f..ff2b289f46c6e62ed7a8eeba8cdca77a12a98d98 100644 |
--- a/Source/platform/graphics/DecodingImageGenerator.cpp |
+++ b/Source/platform/graphics/DecodingImageGenerator.cpp |
@@ -82,4 +82,17 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, |
return decoded; |
} |
+bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) |
+{ |
+ if (!planes || !planes[0]) { |
+ return m_frameGenerator->getComponentSizes(sizes); |
+ } |
+ |
+ TRACE_EVENT0("blink", "DecodingImageGenerator::onGetYUV8Planes"); |
+ PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId); |
+ bool decoded = m_frameGenerator->decodeAndScale(planes, rowBytes); |
+ PlatformInstrumentation::didDecodeLazyPixelRef(); |
+ return decoded; |
+} |
+ |
} // namespace blink |