Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ae620cf03592ffbe246918ad67439e1d71c570e9
https://github.com/WebKit/WebKit/commit/ae620cf03592ffbe246918ad67439e1d71c570e9
Author: Ahmad Saleem <[email protected]>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
M Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp
M Source/WebCore/platform/audio/HRTFKernel.cpp
M Source/WebCore/platform/audio/HRTFPanner.cpp
M Source/WebCore/platform/audio/cocoa/FFTFrameCocoa.cpp
Log Message:
-----------
Use C++20 <bit> header functions in WebCore
https://bugs.webkit.org/show_bug.cgi?id=311406
rdar://174003269
Reviewed by Darin Adler.
Replace manual bit manipulation with C++20 <bit> functions:
- std::bit_floor replaces hand-rolled roundDownToPowerOfTwo
- std::bit_width replaces manual integralLog2 loop and floating-point log2() on
integers
- WTF::isPowerOfTwo replaces verbose 1UL << log2(x) == x power-of-2 checks
* Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::setFftSize):
* Source/WebCore/platform/audio/HRTFKernel.cpp:
(WebCore::extractAverageGroupDelay):
* Source/WebCore/platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::fftSizeForSampleRate):
(WebCore::HRTFPanner::pan):
* Source/WebCore/platform/audio/cocoa/FFTFrameCocoa.cpp:
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::fftSetupForSize):
Canonical link: https://commits.webkit.org/310710@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications