+bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], SkYUVColorSpace* colorSpace)
+{
+ if (!RuntimeEnabledFeatures::decodeToYUVEnabled())
+ return false;
+
+ if (!planes || !planes[0])
+ return m_frameGenerator->getYUVComponentSizes(sizes);
+
+ TRACE_EVENT0("blink", "DecodingImageGenerator::onGetYUV8Planes");
+ PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId);
+ bool decoded = m_frameGenerator->decodeToYUV(sizes, planes, rowBytes);
+ PlatformInstrumentation::didDecodeLazyPixelRef();
+ if (colorSpace)
+ *colorSpace = kJPEG_SkYUVColorSpace;
+ return decoded;
+}
+