Title: [269898] trunk/Source
- Revision
- 269898
- Author
- [email protected]
- Date
- 2020-11-17 06:07:00 -0800 (Tue, 17 Nov 2020)
Log Message
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:
Modified Paths
Diff
Modified: trunk/Source/WTF/wtf/PlatformHave.h (269897 => 269898)
--- trunk/Source/WTF/wtf/PlatformHave.h 2020-11-17 12:56:59 UTC (rev 269897)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2020-11-17 14:07:00 UTC (rev 269898)
@@ -774,3 +774,7 @@
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 110000 && defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
#define HAVE_SANDBOX_MESSAGE_FILTERING 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: trunk/Source/WebCore/PAL/ChangeLog (269897 => 269898)
--- trunk/Source/WebCore/PAL/ChangeLog 2020-11-17 12:56:59 UTC (rev 269897)
+++ trunk/Source/WebCore/PAL/ChangeLog 2020-11-17 14:07:00 UTC (rev 269898)
@@ -1,3 +1,20 @@
+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-11-16 Kimmo Kinnunen <[email protected]>
Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h (269897 => 269898)
--- trunk/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h 2020-11-17 12:56:59 UTC (rev 269897)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h 2020-11-17 14:07:00 UTC (rev 269898)
@@ -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: trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp (269897 => 269898)
--- trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp 2020-11-17 12:56:59 UTC (rev 269897)
+++ trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp 2020-11-17 14:07:00 UTC (rev 269898)
@@ -147,7 +147,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:
@@ -156,7 +158,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;
@@ -583,8 +587,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, "GraphicsContextGLCVANGLE::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