Changeset 269893 in webkit


Ignore:
Timestamp:
Nov 16, 2020 9:23:24 PM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
https://bugs.webkit.org/show_bug.cgi?id=218637
<rdar://problem/71102126>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-11-16
Reviewed by Eric Carlson.

Patch by Jer Noble.

Treat internal compressed YUV pixel formats
kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange and
kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange as
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange and
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange when
using the OpenGL shader to convert video IOSurface to a WebGL
texture.

Fixes cases where the decoder outputs the compressed formats.

No new tests, adding more comprehensive test content suite is tracked
in another bug.

Source/WebCore:

  • platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:

(WebCore::pixelRangeFromPixelFormat):
(WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cf/CoreVideoSPI.h: Added.
Location:
trunk/Source/WebCore
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269888 r269893  
     12020-11-16  Kimmo Kinnunen  <kkinnunen@apple.com>
     2
     3        Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
     4        https://bugs.webkit.org/show_bug.cgi?id=218637
     5        <rdar://problem/71102126>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Patch by Jer Noble.
     10
     11        Treat internal compressed YUV pixel formats
     12        kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange and
     13        kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange as
     14        kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange and
     15        kCVPixelFormatType_420YpCbCr8BiPlanarFullRange when
     16        using the OpenGL shader to convert video IOSurface to a WebGL
     17        texture.
     18
     19        Fixes cases where the decoder outputs the compressed formats.
     20
     21        No new tests, adding more comprehensive test content suite is tracked
     22        in another bug.
     23
     24        * platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:
     25        (WebCore::pixelRangeFromPixelFormat):
     26        (WebCore::GraphicsContextGLCVANGLE::copyPixelBufferToTexture):
     27
    1282020-11-16  Sam Weinig  <weinig@apple.com>
    229
  • trunk/Source/WebCore/PAL/ChangeLog

    r269688 r269893  
     12020-11-16  Kimmo Kinnunen  <kkinnunen@apple.com>
     2
     3        Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
     4        https://bugs.webkit.org/show_bug.cgi?id=218637
     5        <rdar://problem/71102126>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Patch by Jer Noble.
     10
     11        Treat internal compressed YUV pixel formats
     12        kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange and
     13        kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange as
     14        kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange and
     15        kCVPixelFormatType_420YpCbCr8BiPlanarFullRange when
     16        using the OpenGL shader to convert video IOSurface to a WebGL
     17        texture.
     18
     19        Fixes cases where the decoder outputs the compressed formats.
     20
     21        No new tests, adding more comprehensive test content suite is tracked
     22        in another bug.
     23
     24        * PAL.xcodeproj/project.pbxproj:
     25        * pal/spi/cf/CoreVideoSPI.h: Added.
     26
    1272020-11-11  Eric Carlson  <eric.carlson@apple.com>
    228
  • trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj

    r269631 r269893  
    382382                C15CBB3223F34A1200300CC7 /* NSUserDefaultsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSUserDefaultsSPI.h; sourceTree = "<group>"; };
    383383                C2147A4A1EFD0AA600056FA5 /* CopyPALHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyPALHeaders.xcconfig; sourceTree = "<group>"; };
     384                CD17B268255F1625008430F9 /* CoreVideoSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreVideoSPI.h; sourceTree = "<group>"; };
    384385                CD6122CA2559B6AC00FC657A /* OutputContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OutputContext.h; sourceTree = "<group>"; };
    385386                CD6122CB2559B6AC00FC657A /* OutputContext.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = OutputContext.mm; sourceTree = "<group>"; };
     
    444445                                0C2DA06B1F33CA8400DBC317 /* CoreAudioSPI.h */,
    445446                                0C2DA06C1F33CA8400DBC317 /* CoreMediaSPI.h */,
     447                                CD17B268255F1625008430F9 /* CoreVideoSPI.h */,
    446448                        );
    447449                        path = cf;
  • trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp

    r269678 r269893  
    3131#include "FourCC.h"
    3232#include "Logging.h"
     33#include <pal/spi/cf/CoreVideoSPI.h>
    3334#include <pal/spi/cocoa/IOSurfaceSPI.h>
    3435#include <wtf/NeverDestroyed.h>
     
    147148    case kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange:
    148149    case kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange:
     150    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange:
    149151        return PixelRange::Video;
    150152    case kCVPixelFormatType_420YpCbCr8PlanarFullRange:
     
    155157    case kCVPixelFormatType_422YpCbCr10BiPlanarFullRange:
    156158    case kCVPixelFormatType_444YpCbCr10BiPlanarFullRange:
     159    case kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange:
    157160        return PixelRange::Full;
    158161    default:
     
    579582    // FIXME: This currently only supports '420v' and '420f' pixel formats. Investigate supporting more pixel formats.
    580583    OSType pixelFormat = CVPixelBufferGetPixelFormatType(image);
    581     if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) {
     584    if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
     585        && pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
     586        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
     587        && pixelFormat != kCVPixelFormatType_AGX_420YpCbCr8BiPlanarFullRange) {
    582588        LOG(WebGL, "GraphicsContextGLCVANGLE::copyVideoTextureToPlatformTexture(%p) - Asked to copy an unsupported pixel format ('%s').", this, FourCC(pixelFormat).toString().utf8().data());
    583589        return false;
Note: See TracChangeset for help on using the changeset viewer.