Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3484e3687b3ce52e1545a4e764a9176e8bad36da
https://github.com/WebKit/WebKit/commit/3484e3687b3ce52e1545a4e764a9176e8bad36da
Author: Jean-Yves Avenard <[email protected]>
Date: 2025-11-21 (Fri, 21 Nov 2025)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
M Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp
M Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.h
M
Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.messages.in
M Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.cpp
M Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.h
M
Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemoteMessageReceiver.messages.in
Log Message:
-----------
MediaPlayerPrivateWebM will attempt to re-enqueue more samples indefinitely
even when the AudioVideoRenderer isn't ready for it
https://bugs.webkit.org/show_bug.cgi?id=302918
rdar://165187226
Reviewed by Youenn Fablet.
The earlier iteration attempted for the AudioVideoRendererRemote to always
attempt to guess the state of the GPUP's renderer without ever querying it.
We would enqueue a maximum of 20 frames and hold until the GPUP sent a message
back later that would reset the state.
The original idea was to reduce two ways traffic between the content process and
the GPUP.
Conditions existed however where the assumptions that we could always guess
the state of the GPUP broke down.
We now have the GPUP send back asynchronously after enqueing each sample
its readyForMoreData state.
This ensures that the two states (CP vs GPUP) are always in sync.
Covered by existing tests; manually verified that lower CPU usage was observed.
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::isReadyForMoreSamples): Remove the test if
the video track is active.
If a webm had multiple video track, we would have an infinite loop. We move it
to provideMediaData instead.
(WebCore::MediaPlayerPrivateWebM::provideMediaData):
* Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp:
(WebKit::RemoteAudioVideoRendererProxyManager::requestMediaDataWhenReady):
(WebKit::RemoteAudioVideoRendererProxyManager::enqueueSample):
* Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.h:
*
Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.messages.in:
Rename IPC from requestMediaDataWhenReady to readyForMoreMediaData for clarity
* Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.cpp:
(WebKit::AudioVideoRendererRemote::enqueueSample):
(WebKit::AudioVideoRendererRemote::isReadyForMoreSamples):
(WebKit::AudioVideoRendererRemote::requestMediaDataWhenReady):
(WebKit::AudioVideoRendererRemote::stopRequestingMediaData):
(WebKit::AudioVideoRendererRemote::readyForMoreDataState):
(WebKit::AudioVideoRendererRemote::resolveRequestMediaDataWhenReadyIfNeeded):
(WebKit::AudioVideoRendererRemote::MessageReceiver::readyForMoreMediaData):
(WebKit::AudioVideoRendererRemote::readyForMoreData): Deleted.
(WebKit::AudioVideoRendererRemote::MessageReceiver::requestMediaDataWhenReady):
Deleted.
* Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.h:
*
Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemoteMessageReceiver.messages.in:
Canonical link: https://commits.webkit.org/303386@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications