Title: [274614] trunk
Revision
274614
Author
[email protected]
Date
2021-03-17 22:20:19 -0700 (Wed, 17 Mar 2021)

Log Message

[GPUP] WebGL2RenderingContext::texImage2D() does not work with a video as the image source
https://bugs.webkit.org/show_bug.cgi?id=223294

Reviewed by Eric Carlson.

Source/WebKit:

No new tests. Fix a test failure.

* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::updateCachedState):
Add a missing piece to implement `MediaPlayerPrivateRemote::videoPlaybackQualityMetrics()`.

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/media/media-source/videoplaybackquality-decompressionsession-expected.txt:
* platform/mac/media/media-source/videoplaybackquality-decompressionsession.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (274613 => 274614)


--- trunk/LayoutTests/ChangeLog	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/LayoutTests/ChangeLog	2021-03-18 05:20:19 UTC (rev 274614)
@@ -1,3 +1,14 @@
+2021-03-17  Peng Liu  <[email protected]>
+
+        [GPUP] WebGL2RenderingContext::texImage2D() does not work with a video as the image source
+        https://bugs.webkit.org/show_bug.cgi?id=223294
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac/TestExpectations:
+        * platform/mac/media/media-source/videoplaybackquality-decompressionsession-expected.txt:
+        * platform/mac/media/media-source/videoplaybackquality-decompressionsession.html:
+
 2021-03-17  Lauro Moura  <[email protected]>
 
         [GLIB] Gardening more consistent failures

Modified: trunk/LayoutTests/platform/mac/TestExpectations (274613 => 274614)


--- trunk/LayoutTests/platform/mac/TestExpectations	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2021-03-18 05:20:19 UTC (rev 274614)
@@ -865,8 +865,6 @@
 webkit.org/b/161725 imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html [ Skip ]
 webkit.org/b/214166 imported/w3c/web-platform-tests/media-source/idlharness.window.html [ Skip ]
 
-webkit.org/b/223294 platform/mac/media/media-source/videoplaybackquality-decompressionsession.html [ Failure ]
-
 # Requires WebM
 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html [ Skip ]
 imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate.html [ Skip ]

Modified: trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession-expected.txt (274613 => 274614)


--- trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession-expected.txt	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession-expected.txt	2021-03-18 05:20:19 UTC (rev 274614)
@@ -6,6 +6,7 @@
 EVENT(update)
 RUN(sourceBuffer.appendBuffer(loader.mediaSegment(0)))
 EVENT(update)
+EVENT(resize)
 RUN(canvas = document.createElement("canvas"))
 RUN(gl = canvas.getContext("webgl"))
 RUN(texture = gl.createTexture())

Modified: trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession.html (274613 => 274614)


--- trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession.html	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/LayoutTests/platform/mac/media/media-source/videoplaybackquality-decompressionsession.html	2021-03-18 05:20:19 UTC (rev 274614)
@@ -32,6 +32,10 @@
     }
 
     function mediaSegmentAppended() {
+        waitForEventOn(video, 'resize', videoFrameAvailable, false, true);
+    }
+
+    function videoFrameAvailable() {
         run('canvas = document.createElement("canvas")');
         run('gl = canvas.getContext("webgl")');
         run('texture = gl.createTexture()');
@@ -46,12 +50,14 @@
         video.addEventListener('timeupdate', timeupdate);
     }
 
-    function timeupdate() {
+    async function timeupdate() {
         if (video.currentTime == 0)
             return;
 
+        // There could be a delay that a video element gets the VideoPlaybackQualityMetrics
+        // from its media player (refer to RemoteMediaPlayerProxy::startUpdateCachedStateMessageTimer()).
         consoleWrite('EVENT(timeupdate)');
-        testExpected('video.getVideoPlaybackQuality().totalVideoFrames', '0', '>');
+        await testExpectedEventually('video.getVideoPlaybackQuality().totalVideoFrames', '0', '>');
         endTest();
     }
 

Modified: trunk/Source/WebKit/ChangeLog (274613 => 274614)


--- trunk/Source/WebKit/ChangeLog	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/Source/WebKit/ChangeLog	2021-03-18 05:20:19 UTC (rev 274614)
@@ -1,3 +1,16 @@
+2021-03-17  Peng Liu  <[email protected]>
+
+        [GPUP] WebGL2RenderingContext::texImage2D() does not work with a video as the image source
+        https://bugs.webkit.org/show_bug.cgi?id=223294
+
+        Reviewed by Eric Carlson.
+
+        No new tests. Fix a test failure.
+
+        * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+        (WebKit::MediaPlayerPrivateRemote::updateCachedState):
+        Add a missing piece to implement `MediaPlayerPrivateRemote::videoPlaybackQualityMetrics()`.
+
 2021-03-17  Wenson Hsieh  <[email protected]>
 
         [iOS] Refactor some gesture deferral logic to account for image extraction

Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (274613 => 274614)


--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-03-18 04:38:37 UTC (rev 274613)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-03-18 05:20:19 UTC (rev 274614)
@@ -438,6 +438,10 @@
     m_cachedState.canSaveMediaData = state.canSaveMediaData;
     m_cachedState.hasAudio = state.hasAudio;
     m_cachedState.hasVideo = state.hasVideo;
+
+    if (m_wantPlaybackQualityMetrics)
+        m_cachedState.videoMetrics = state.videoMetrics;
+
     m_cachedState.hasClosedCaptions = state.hasClosedCaptions;
     m_cachedState.hasAvailableVideoFrame = state.hasAvailableVideoFrame;
     m_cachedState.wirelessVideoPlaybackDisabled = state.wirelessVideoPlaybackDisabled;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to