Changeset 269898 in webkit


Ignore:
Timestamp:
Nov 17, 2020 6:07:00 AM (3 years ago)
Author:
commit-queue@webkit.org
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 <kkinnunen@apple.com> 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:
Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/wtf/PlatformHave.h

    r269867 r269898  
    775775#define HAVE_SANDBOX_MESSAGE_FILTERING 1
    776776#endif
     777
     778#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000)
     779#define HAVE_CV_AGX_420_PIXEL_FORMAT_TYPES 1
     780#endif
  • trunk/Source/WebCore/PAL/ChangeLog

    r269893 r269898  
     12020-11-17  Kimmo Kinnunen  <kkinnunen@apple.com>
     2
     3        Build fails on internal Catalina due to missing enum kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
     4        https://bugs.webkit.org/show_bug.cgi?id=219026
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Fix compile for macOS versions before Big Sur.
     9
     10        On macOS, only use the private header on Big Sur. On Catalina, use the
     11        manual enums.
     12
     13        Regressed in:
     14        Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
     15
     16        * pal/spi/cf/CoreVideoSPI.h:
     17
    1182020-11-16  Kimmo Kinnunen  <kkinnunen@apple.com>
    219
  • trunk/Source/WebCore/PAL/pal/spi/cf/CoreVideoSPI.h

    r269893 r269898  
    3131#include <CoreVideo/CVPixelBufferPrivate.h>
    3232#else
     33
     34#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
    3335enum {
    3436    kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange = '&8v0',
     
    3638};
    3739#endif
     40
     41#endif
  • trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp

    r269893 r269898  
    148148    case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
    149149    case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
     150#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
    150151    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange:
     152#endif
    151153        return PixelRange::Video;
    152154    case kCVPixelFormatType_420YpCbCr8PlanarFullRange:
     
    157159    case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange:
    158160    case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange:
     161#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
    159162    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange:
     163#endif
    160164        return PixelRange::Full;
    161165    default:
     
    584588    if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
    585589        && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
     590#if HAVE(CV_AGX_420_PIXEL_FORMAT_TYPES)
    586591        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
    587         && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange) {
     592        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange
     593#endif
     594        ) {
    588595        LOG(WebGL, "GraphicsContextGLCVANGLE::copyVideoTextureToPlatformTexture(%p) - Asked to copy an unsupported pixel format ('%s').", this, FourCC(pixelFormat).toString().utf8().data());
    589596        return false;
Note: See TracChangeset for help on using the changeset viewer.