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

Unified Diff: Source/platform/graphics/DecodingImageGenerator.cpp

Issue 418653002: Allowing YUV data to be retrieved from the JPEG Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed useless added parameter Created 6 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
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

Powered by Google App Engine
This is Rietveld 408576698