Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (223659 => 223660)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 04:29:53 UTC (rev 223659)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 04:29:56 UTC (rev 223660)
@@ -1,5 +1,18 @@
2017-10-18 Jason Marcell <[email protected]>
+ Cherry-pick r223297. rdar://problem/34958928
+
+ 2017-10-13 Jer Noble <[email protected]>
+
+ One last unreviewed build fix; since the IOSurface APIs don't exist at
+ all on the simulator, just wrap the entirety of the implementation of
+ copyImageToPlatformTexture() in a #if USE(IOSURFACE) check.
+
+ * platform/graphics/cv/VideoTextureCopierCV.cpp:
+ (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
+
+2017-10-18 Jason Marcell <[email protected]>
+
Cherry-pick r223295. rdar://problem/34958928
2017-10-13 Jer Noble <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (223659 => 223660)
--- branches/safari-604-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-19 04:29:53 UTC (rev 223659)
+++ branches/safari-604-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp 2017-10-19 04:29:56 UTC (rev 223660)
@@ -502,6 +502,7 @@
if (auto texture = m_textureCache->textureFromImage(image, outputTarget, level, internalFormat, format, type))
return copyVideoTextureToPlatformTexture(texture.get(), width, height, outputTexture, outputTarget, level, internalFormat, format, type, premultiplyAlpha, flipY);
+#if USE(IOSURFACE)
// FIXME: This currently only supports '420v' and '420f' pixel formats. Investigate supporting more pixel formats.
OSType pixelFormat = CVPixelBufferGetPixelFormatType(image);
if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) {
@@ -604,6 +605,9 @@
m_context->bindTexture(videoTextureTarget, 0);
return true;
+#else
+ return false;
+#endif // USE(IOSURFACE)
}
bool VideoTextureCopierCV::copyVideoTextureToPlatformTexture(TextureType inputVideoTexture, size_t width, size_t height, Platform3DObject outputTexture, GC3Denum outputTarget, GC3Dint level, GC3Denum internalFormat, GC3Denum format, GC3Denum type, bool premultiplyAlpha, bool flipY)