Bug 256695

Summary: WebRTC backed media element rendering is slow to update to changes of layers (size or layer made hidden/visible)
Product: WebKit Reporter: youenn fablet <youennf>
Component: Layout and RenderingAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, eric.carlson, jer.noble, ltsg0317, pvollan, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

youenn fablet
Reported 2023-05-12 04:29:44 PDT
WebRTC backed media element rendering is slow to update to changes of layers (size or layer made hidden/visible)
Attachments
Radar WebKit Bug Importer
Comment 1 2023-05-12 04:30:04 PDT
youenn fablet
Comment 2 2023-05-12 04:31:12 PDT
It takes sometimes more than one second for rendering to be updated. I was able to see this with a recent Safari build on iOS when rotating devices (in which case the size of the video element may change). I was also able to see this on macOS when setting a video track to enabled=false. It takes sometimes more than one second to have the layer being hidden.
youenn fablet
Comment 3 2023-05-12 04:33:04 PDT
I wonder whether this is related to changes we did related to CARenderServer blocking. Is there an easy way to unblock it and get back to the previous GPU based approach?
youenn fablet
Comment 4 2023-05-23 23:33:09 PDT
There are LocalSampleBufferDisplayLayer logs at the time we enqueue video frames in the AVSBDL. It may take more than 5 seconds sometime to render the first video frame.
youenn fablet
Comment 5 2023-05-24 03:28:48 PDT
This is a regression from https://bugs.webkit.org/show_bug.cgi?id=253761. Reverting https://commits.webkit.org/261709@main fixes the issue. When the page is blank at camera starting time in macOS, CADebug tells us that the "LocalSampleBufferDisplayLayer AVSampleBufferDisplayLayer parent" size is (0, 0). When the rendering is ok, the size is correctly set. What is strange is that LocalSampleBufferDisplayLayer sets its CALayer bounds in a timely manner, but it does not seem to show up in CADebug. At some point, rendering is updated, sometimes after 1 second, sometimes after 5 or more seconds.
youenn fablet
Comment 6 2023-05-31 04:28:21 PDT
EWS
Comment 7 2023-05-31 22:58:08 PDT
Committed 264777@main (0e0d7976dfe0): <https://commits.webkit.org/264777@main> Reviewed commits have been landed. Closing PR #14534 and removing active labels.
youenn fablet
Comment 8 2023-06-20 00:00:11 PDT
*** Bug 257885 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.