Skip to content

Commit

Permalink
[macOS Sonoma+] Enable microphone capture in GPUProcess for all appli…
Browse files Browse the repository at this point in the history
…cations

https://bugs.webkit.org/show_bug.cgi?id=274464
rdar://128463834

Reviewed by Jean-Yves Avenard.

Given rdar://problem/29448368 is fixed in Sonoma, we can enable GPU process microphone capture.
This allows to reuse VPIO for audio rendering like Safari does.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCaptureAudioInGPUProcessEnabled):

Canonical link: https://commits.webkit.org/279113@main
  • Loading branch information
youennf committed May 22, 2024
1 parent 4ec5cde commit 05456ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Source/WTF/wtf/PlatformHave.h
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,10 @@
#define HAVE_AVCAPTUREDEVICE 1
#endif

#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000)
#define HAVE_REQUIRE_MICROPHONE_CAPTURE_IN_UIPROCESS 1
#endif

#if PLATFORM(MAC) && defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)
#define HAVE_SANDBOX_MESSAGE_FILTERING 1
#endif
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ bool defaultAppleMailPaginationQuirkEnabled()

bool defaultCaptureAudioInGPUProcessEnabled()
{
#if PLATFORM(MAC)
// FIXME: Enable GPU process audio capture when <rdar://problem/29448368> is fixed.
#if HAVE(REQUIRE_MICROPHONE_CAPTURE_IN_UIPROCESS)
// Newer versions can capture microphone in GPUProcess.
if (!WebCore::MacApplication::isSafari())
return false;
#endif
Expand Down

0 comments on commit 05456ae

Please sign in to comment.