Title: [270913] branches/safari-610-branch/Source
Revision
270913
Author
[email protected]
Date
2020-12-16 16:10:47 -0800 (Wed, 16 Dec 2020)

Log Message

Cherry-pick r269898. rdar://problem/72298580

    Build fails on internal Catalina due to missing enum kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
    https://bugs.webkit.org/show_bug.cgi?id=219026

    Patch by Kimmo Kinnunen <[email protected]> on 2020-11-17
    Reviewed by Antti Koivisto.

    Fix compile for macOS versions before Big Sur.

    On macOS, only use the private header on Big Sur. On Catalina, use the
    manual enums.

    Regressed in:
    Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]

    * pal/spi/cf/CoreVideoSPI.h:

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

Modified Paths

Diff

Modified: branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h (270912 => 270913)


--- branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h	2020-12-16 23:14:20 UTC (rev 270912)
+++ branches/safari-610-branch/Source/WTF/wtf/PlatformHave.h	2020-12-17 00:10:47 UTC (rev 270913)
@@ -717,3 +717,7 @@
     || (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 140400)
 #define HAVE_LIBXSLT_FIX_FOR_RADAR_71864140 1
 #endif
+
+#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
+#define HAVE_CV_AGX_420_PIXEL_FORMAT_TYPES 1
+#endif

Modified: branches/safari-610-branch/Source/WebCore/PAL/ChangeLog (270912 => 270913)


--- branches/safari-610-branch/Source/WebCore/PAL/ChangeLog	2020-12-16 23:14:20 UTC (rev 270912)
+++ branches/safari-610-branch/Source/WebCore/PAL/ChangeLog	2020-12-17 00:10:47 UTC (rev 270913)
@@ -1,3 +1,42 @@
+2020-12-16  Alan Coon  <[email protected]>
+
+        Cherry-pick r269898. rdar://problem/72298580
+
+    Build fails on internal Catalina due to missing enum kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
+    https://bugs.webkit.org/show_bug.cgi?id=219026
+    
+    Patch by Kimmo Kinnunen <[email protected]> on 2020-11-17
+    Reviewed by Antti Koivisto.
+    
+    Fix compile for macOS versions before Big Sur.
+    
+    On macOS, only use the private header on Big Sur. On Catalina, use the
+    manual enums.
+    
+    Regressed in:
+    Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
+    
+    * pal/spi/cf/CoreVideoSPI.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-11-17  Kimmo Kinnunen  <[email protected]>
+
+            Build fails on internal Catalina due to missing enum kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
+            https://bugs.webkit.org/show_bug.cgi?id=219026
+
+            Reviewed by Antti Koivisto.
+
+            Fix compile for macOS versions before Big Sur.
+
+            On macOS, only use the private header on Big Sur. On Catalina, use the
+            manual enums.
+
+            Regressed in:
+            Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
+
+            * pal/spi/cf/CoreVideoSPI.h:
+
 2020-12-14  Alan Coon  <[email protected]>
 
         Cherry-pick r269893. rdar://problem/72298580

Modified: branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h (270912 => 270913)


--- branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h	2020-12-16 23:14:20 UTC (rev 270912)
+++ branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h	2020-12-17 00:10:47 UTC (rev 270913)
@@ -30,8 +30,12 @@
 #if USE(APPLE_INTERNAL_SDK)
 #include <CoreVideo/CVPixelBufferPrivate.h>
 #else
+
+#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
 enum {
     kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange = '&8v0',
     kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange = '&8f0',
 };
 #endif
+
+#endif

Modified: branches/safari-610-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp (270912 => 270913)


--- branches/safari-610-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp	2020-12-16 23:14:20 UTC (rev 270912)
+++ branches/safari-610-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp	2020-12-17 00:10:47 UTC (rev 270913)
@@ -199,7 +199,9 @@
     case kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange:
     case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
     case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
+#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
     case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange:
+#endif
         return PixelRange::Video;
     case kCVPixelFormatType_420YpCbCr8PlanarFullRange:
     case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
@@ -208,7 +210,9 @@
     case kCVPixelFormatType_420YpCbCr10BiPlanarFullRange:
     case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange:
     case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange:
+#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
     case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange:
+#endif
         return PixelRange::Full;
     default:
         return PixelRange::Unknown;
@@ -816,8 +820,11 @@
     OSType pixelFormat = CVPixelBufferGetPixelFormatType(image);
     if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
         && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
+#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
         && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
-        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange) {
+        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange
+#endif
+        ) {
         LOG(WebGL, "VideoTextureCopierCV::copyVideoTextureToPlatformTexture(%p) - Asked to copy an unsupported pixel format ('%s').", this, FourCC(pixelFormat).toString().utf8().data());
         return false;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to