Title: [281921] trunk
Revision
281921
Author
[email protected]
Date
2021-09-02 07:50:01 -0700 (Thu, 02 Sep 2021)

Log Message

REGRESSION(r277763): [Debug][GLib] fast/mediastream timeouts
https://bugs.webkit.org/show_bug.cgi?id=229665

Patch by Philippe Normand <[email protected]> on 2021-09-02
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The tests were timing out in Debug because of the unaccelerated PixelBuffer conversions
triggered from the GStreamer mock video source. Making the AlphaPremultiplication value
match between the source and destination buffers allows us to skip this expensive
conversion. A memcpy is now done if the source and destination parameters match, there is no
need to do pixel-per-pixel copies in this case.

* platform/graphics/PixelBufferConversion.cpp:
(WebCore::convertImagePixels):
* platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
(WebCore::MockRealtimeVideoSourceGStreamer::updateSampleBuffer):

LayoutTests:

* platform/glib/TestExpectations: Update expectations, some tests pass now, apart from two
getDisplayMedia tests, to be handled in another patch.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281920 => 281921)


--- trunk/LayoutTests/ChangeLog	2021-09-02 12:45:25 UTC (rev 281920)
+++ trunk/LayoutTests/ChangeLog	2021-09-02 14:50:01 UTC (rev 281921)
@@ -1,3 +1,13 @@
+2021-09-02  Philippe Normand  <[email protected]>
+
+        REGRESSION(r277763): [Debug][GLib] fast/mediastream timeouts
+        https://bugs.webkit.org/show_bug.cgi?id=229665
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * platform/glib/TestExpectations: Update expectations, some tests pass now, apart from two
+        getDisplayMedia tests, to be handled in another patch.
+
 2021-09-02  Andres Gonzalez  <[email protected]>
 
         Braille display is blank in contenteditable elements when the field is followed by another element.

Modified: trunk/LayoutTests/platform/glib/TestExpectations (281920 => 281921)


--- trunk/LayoutTests/platform/glib/TestExpectations	2021-09-02 12:45:25 UTC (rev 281920)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2021-09-02 14:50:01 UTC (rev 281921)
@@ -2424,14 +2424,8 @@
 
 webkit.org/b/229347 imported/w3c/web-platform-tests/css/css-text/overflow-wrap/overflow-wrap-cluster-002.html [ ImageOnlyFailure ]
 
-webkit.org/b/229665 [ Debug ] fast/mediastream/constraint-intrinsic-size.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/get-user-media-device-id.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/getDisplayMedia-frame-rate.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/getDisplayMedia-max-constraints1.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/getDisplayMedia-max-constraints2.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/getDisplayMedia-max-constraints3.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] fast/mediastream/screencapture-user-gesture.html [ Timeout ]
-webkit.org/b/229665 [ Debug ] webrtc/h264-high.html [ Timeout ]
+webkit.org/b/229715 [ Debug ] fast/mediastream/getDisplayMedia-max-constraints3.html [ Timeout ]
+webkit.org/b/229715 [ Debug ] fast/mediastream/screencapture-user-gesture.html [ Timeout ]
 
 webkit.org/b/229734 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-normal-hyphens-002.html [ ImageOnlyFailure ]
 webkit.org/b/229734 imported/w3c/web-platform-tests/css/css-text/line-break/line-break-strict-hyphens-002.html [ ImageOnlyFailure ]

Modified: trunk/Source/WebCore/ChangeLog (281920 => 281921)


--- trunk/Source/WebCore/ChangeLog	2021-09-02 12:45:25 UTC (rev 281920)
+++ trunk/Source/WebCore/ChangeLog	2021-09-02 14:50:01 UTC (rev 281921)
@@ -1,3 +1,21 @@
+2021-09-02  Philippe Normand  <[email protected]>
+
+        REGRESSION(r277763): [Debug][GLib] fast/mediastream timeouts
+        https://bugs.webkit.org/show_bug.cgi?id=229665
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        The tests were timing out in Debug because of the unaccelerated PixelBuffer conversions
+        triggered from the GStreamer mock video source. Making the AlphaPremultiplication value
+        match between the source and destination buffers allows us to skip this expensive
+        conversion. A memcpy is now done if the source and destination parameters match, there is no
+        need to do pixel-per-pixel copies in this case.
+
+        * platform/graphics/PixelBufferConversion.cpp:
+        (WebCore::convertImagePixels):
+        * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
+        (WebCore::MockRealtimeVideoSourceGStreamer::updateSampleBuffer):
+
 2021-09-02  Andres Gonzalez  <[email protected]>
 
         Braille display is blank in contenteditable elements when the field is followed by another element.

Modified: trunk/Source/WebCore/platform/graphics/PixelBufferConversion.cpp (281920 => 281921)


--- trunk/Source/WebCore/platform/graphics/PixelBufferConversion.cpp	2021-09-02 12:45:25 UTC (rev 281920)
+++ trunk/Source/WebCore/platform/graphics/PixelBufferConversion.cpp	2021-09-02 14:50:01 UTC (rev 281921)
@@ -254,6 +254,13 @@
     // This could be added using conversion functions from ColorConversion.h.
     ASSERT(source.format.colorSpace == destination.format.colorSpace);
 
+    if (source.format.alphaFormat == destination.format.alphaFormat && source.format.pixelFormat == destination.format.pixelFormat) {
+        memcpy(destination.rows, source.rows, source.bytesPerRow * destinationSize.height());
+        return;
+    }
+
+    // FIXME: In Linux platform the following paths could be optimized with ORC.
+
     if (source.format.alphaFormat == destination.format.alphaFormat) {
         if (source.format.pixelFormat == destination.format.pixelFormat) {
             if (source.format.alphaFormat == AlphaPremultiplication::Premultiplied)

Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp (281920 => 281921)


--- trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp	2021-09-02 12:45:25 UTC (rev 281920)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp	2021-09-02 14:50:01 UTC (rev 281921)
@@ -147,7 +147,7 @@
     if (!imageBuffer)
         return;
 
-    auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Unpremultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->logicalSize() });
+    auto pixelBuffer = imageBuffer->getPixelBuffer({ AlphaPremultiplication::Premultiplied, PixelFormat::BGRA8, DestinationColorSpace::SRGB() }, { { }, imageBuffer->logicalSize() });
     if (!pixelBuffer)
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to