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

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

Issue 1719533002: Modify YUV codecs to match Skia's API change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DEPS again Created 4 years, 9 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: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
index 64d6223d6af84d4c2aaed13b95cd5ae9f5164a10..d857ae67c89a53628bf3340dbbfd11ca35eecedf 100644
--- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
@@ -75,23 +75,27 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels,
return decoded;
}
-bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace)
+bool DecodingImageGenerator::onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const
{
if (!m_canYUVDecode)
return false;
- bool requestingYUVSizes = !planes || !planes[0];
-
- TRACE_EVENT1("blink", "DecodingImageGenerator::getYUV8Planes", requestingYUVSizes ? "sizes" : "frame index", static_cast<int>(m_frameIndex));
-
- if (requestingYUVSizes)
- return m_frameGenerator->getYUVComponentSizes(sizes);
+ TRACE_EVENT1("blink", "DecodingImageGenerator::queryYUV8", "sizes", static_cast<int>(m_frameIndex));
if (colorSpace)
*colorSpace = kJPEG_SkYUVColorSpace;
+ return m_frameGenerator->getYUVComponentSizes(sizeInfo);
+}
+
+bool DecodingImageGenerator::onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3])
+{
+ ASSERT(m_canYUVDecode);
+
+ TRACE_EVENT1("blink", "DecodingImageGenerator::getYUV8Planes", "frame index", static_cast<int>(m_frameIndex));
+
PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId);
- bool decoded = m_frameGenerator->decodeToYUV(m_frameIndex, sizes, planes, rowBytes);
+ bool decoded = m_frameGenerator->decodeToYUV(m_frameIndex, sizeInfo.fSizes, planes, sizeInfo.fWidthBytes);
PlatformInstrumentation::didDecodeLazyPixelRef();
return decoded;

Powered by Google App Engine
This is Rietveld 408576698