Title: [270705] trunk/Source/WebKit
Revision
270705
Author
[email protected]
Date
2020-12-11 13:04:23 -0800 (Fri, 11 Dec 2020)

Log Message

[GPUProcess] WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=219797

Reviewed by Eric Carlson.

WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled. This generates a lot more
IPC unnecessarily, not to mention how WebAudio code expects a rendering quantum of 128 and could potentially
do bad things with a lower value.

The issue was that RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess() was iterating over
all RemoteAudioSessionProxy objects to find out the lowest rendering quantum. If there is a proxy with
a preferred buffer size that is not set, the value ends up being 0. When then ask core audio for a rendering
quantum of 0, and they end up using 15 (likely the minimum).

* GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (270704 => 270705)


--- trunk/Source/WebKit/ChangeLog	2020-12-11 20:53:08 UTC (rev 270704)
+++ trunk/Source/WebKit/ChangeLog	2020-12-11 21:04:23 UTC (rev 270705)
@@ -1,3 +1,22 @@
+2020-12-11  Chris Dumez  <[email protected]>
+
+        [GPUProcess] WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=219797
+
+        Reviewed by Eric Carlson.
+
+        WebAudio rendering quantum is 15 instead of 128 when the GPU Process is enabled. This generates a lot more
+        IPC unnecessarily, not to mention how WebAudio code expects a rendering quantum of 128 and could potentially
+        do bad things with a lower value.
+
+        The issue was that RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess() was iterating over
+        all RemoteAudioSessionProxy objects to find out the lowest rendering quantum. If there is a proxy with
+        a preferred buffer size that is not set, the value ends up being 0. When then ask core audio for a rendering
+        quantum of 0, and they end up using 15 (likely the minimum).
+
+        * GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
+        (WebKit::RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess):
+
 2020-12-11  Don Olmstead  <[email protected]>
 
         [PlayStation] Link additional libraries into processes after r270690

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp (270704 => 270705)


--- trunk/Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp	2020-12-11 20:53:08 UTC (rev 270704)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp	2020-12-11 21:04:23 UTC (rev 270705)
@@ -105,7 +105,7 @@
 void RemoteAudioSessionProxyManager::setPreferredBufferSizeForProcess(RemoteAudioSessionProxy& proxy, size_t preferredBufferSize)
 {
     for (auto& otherProxy : m_proxies) {
-        if (otherProxy.preferredBufferSize() < preferredBufferSize)
+        if (otherProxy.preferredBufferSize() && otherProxy.preferredBufferSize() < preferredBufferSize)
             preferredBufferSize = otherProxy.preferredBufferSize();
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to