[Catalina] LayoutTest fast/canvas/webgl/texImage2D-mse-flip-{true,false}.html failing
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 21:56:16 +0000 (21:56 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 21:56:16 +0000 (21:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202771
<rdar://problem/49441298>

Reviewed by Eric Carlson.

Catalina no longer creates IOSurface-backed CVPixelBuffers by default for certain
codecs; make the CVPixelBuffers generated by WebCoreDecompressionSession IOSurface-backed
explicitly by passing in the correct attributes when creating the VTDecompressionSession.

* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm

index b85c1b7..ead1d6f 100644 (file)
@@ -1,3 +1,18 @@
+2019-10-10  Jer Noble  <jer.noble@apple.com>
+
+        [Catalina] LayoutTest fast/canvas/webgl/texImage2D-mse-flip-{true,false}.html failing
+        https://bugs.webkit.org/show_bug.cgi?id=202771
+        <rdar://problem/49441298>
+
+        Reviewed by Eric Carlson.
+
+        Catalina no longer creates IOSurface-backed CVPixelBuffers by default for certain
+        codecs; make the CVPixelBuffers generated by WebCoreDecompressionSession IOSurface-backed
+        explicitly by passing in the correct attributes when creating the VTDecompressionSession.
+
+        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+        (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
+
 2019-10-10  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
index aad9c66..4230e11 100644 (file)
@@ -223,9 +223,9 @@ void WebCoreDecompressionSession::ensureDecompressionSessionForSample(CMSampleBu
         auto videoDecoderSpecification = @{ (__bridge NSString *)kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder: @YES };
 
         NSDictionary *attributes;
-        if (m_mode == OpenGL) {
-            attributes = nil;
-        else {
+        if (m_mode == OpenGL)
+            attributes = @{ (__bridge NSString*)kCVPixelBufferIOSurfacePropertiesKey: @{ /* empty dictionary */ } };
+        else {
             ASSERT(m_mode == RGB);
             attributes = @{ (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) };
         }