One last unreviewed build fix; since the IOSurface APIs don't exist at
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2017 19:55:47 +0000 (19:55 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2017 19:55:47 +0000 (19:55 +0000)
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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223297 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp

index 753f7dd..d9dedd6 100644 (file)
@@ -1,5 +1,14 @@
 2017-10-13  Jer Noble  <jer.noble@apple.com>
 
+        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-13  Jer Noble  <jer.noble@apple.com>
+
         Unreviewed build fix for the previous build fix; use the right PAL path for IOSurfaceSPI.h.
 
         * platform/graphics/cv/VideoTextureCopierCV.cpp:
index 5842150..97a33e1 100644 (file)
@@ -502,6 +502,7 @@ bool VideoTextureCopierCV::copyImageToPlatformTexture(CVPixelBufferRef image, si
     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 @@ bool VideoTextureCopierCV::copyImageToPlatformTexture(CVPixelBufferRef image, si
     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)