[webkit-changes] [WebKit/WebKit] 984773: Respond to thermal pressure more aggressively
bnham
noreply at github.com
Sun Dec 15 13:34:33 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 984773adbeed0269b4c5bdf1d1938afdffef343a
https://github.com/WebKit/WebKit/commit/984773adbeed0269b4c5bdf1d1938afdffef343a
Author: Ben Nham <nham at apple.com>
Date: 2024-12-15 (Sun, 15 Dec 2024)
Changed paths:
A LayoutTests/fast/animation/css-animation-throttling-expected.txt
R LayoutTests/fast/animation/css-animation-throttling-lowPowerMode-expected.txt
R LayoutTests/fast/animation/css-animation-throttling-lowPowerMode.html
A LayoutTests/fast/animation/css-animation-throttling.html
A LayoutTests/fast/animation/request-animation-frame-throttling-aggressiveThermalMitigation-expected.txt
A LayoutTests/fast/animation/request-animation-frame-throttling-aggressiveThermalMitigation.html
A LayoutTests/fast/dom/timer-throttling-aggressiveThermalMitigation-expected.txt
A LayoutTests/fast/dom/timer-throttling-aggressiveThermalMitigation.html
M LayoutTests/media/media-usage-state-expected.txt
M LayoutTests/media/media-usage-state.html
A LayoutTests/media/modern-media-controls/start-support/start-support-aggressiveThermalMitigation-expected.txt
A LayoutTests/media/modern-media-controls/start-support/start-support-aggressiveThermalMitigation.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M LayoutTests/platform/win/TestExpectations
R LayoutTests/svg/animations/animations-lowPowerMode-throttling-expected.txt
R LayoutTests/svg/animations/animations-lowPowerMode-throttling.html
A LayoutTests/svg/animations/animations-throttling-expected.txt
A LayoutTests/svg/animations/animations-throttling.html
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Headers.cmake
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/html/MediaElementSession.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/platform/cocoa/PowerSourceNotifier.h
M Source/WebCore/platform/graphics/AnimationFrameRate.cpp
M Source/WebCore/platform/graphics/AnimationFrameRate.h
M Source/WebCore/platform/graphics/MediaUsageInfo.h
M Source/WebCore/platform/mac/PlatformScreenMac.mm
M Source/WebCore/svg/animation/SMILTimeContainer.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCache.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Tools/TestWebKitAPI/Tests/WebCore/AnimationFrameRate.cpp
Log Message:
-----------
Respond to thermal pressure more aggressively
https://bugs.webkit.org/show_bug.cgi?id=284586
rdar://141402176
Reviewed by Chris Dumez.
Currently WebKit responds to thermal pressure only by increasing the DOMTimer alignment interval.
This patch adds a preference (RespondToThermalPressureAggressively) which causes to WebKit to
respond to thermal pressure by taking additional actions:
- Reducing the preferred animation frame rate
- Disabling autoplay videos without a user gesture
- Disabling HDR
- Disabling speculative loads in NetworkProcess
These actions should be safe since we throttle these exact behaviors when enabling low power mode.
* LayoutTests/fast/animation/css-animation-throttling-expected.txt: Renamed from LayoutTests/fast/animation/css-animation-throttling-lowPowerMode-expected.txt.
* LayoutTests/fast/animation/css-animation-throttling.html: Renamed from LayoutTests/fast/animation/css-animation-throttling-lowPowerMode.html.
* LayoutTests/fast/animation/request-animation-frame-throttling-aggressiveThermalMitigation-expected.txt: Added.
* LayoutTests/fast/animation/request-animation-frame-throttling-aggressiveThermalMitigation.html: Added.
* LayoutTests/fast/dom/timer-throttling-aggressiveThermalMitigation-expected.txt: Added.
* LayoutTests/fast/dom/timer-throttling-aggressiveThermalMitigation.html: Added.
* LayoutTests/media/media-usage-state-expected.txt:
* LayoutTests/media/media-usage-state.html:
* LayoutTests/media/modern-media-controls/start-support/start-support-aggressiveThermalMitigation-expected.txt: Added.
* LayoutTests/media/modern-media-controls/start-support/start-support-aggressiveThermalMitigation.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* LayoutTests/svg/animations/animations-throttling-expected.txt: Renamed from LayoutTests/svg/animations/animations-lowPowerMode-throttling-expected.txt.
* LayoutTests/svg/animations/animations-throttling.html: Renamed from LayoutTests/svg/animations/animations-lowPowerMode-throttling.html.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Headers.cmake:
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::initializeMediaSession):
(WebCore::HTMLMediaElement::shouldForceControlsDisplay const):
(WebCore::HTMLMediaElement::removeBehaviorRestrictionsAfterFirstUserGesture):
* Source/WebCore/html/MediaElementSession.cpp:
(WebCore::restrictionNames):
(WebCore::MediaElementSession::playbackStateChangePermitted const):
(WebCore::MediaElementSession::updateMediaUsageIfChanged):
* Source/WebCore/html/MediaElementSession.h:
* Source/WebCore/page/Page.cpp:
(WebCore::m_activeNowPlayingSessionUpdateTimer):
(WebCore::Page::setAggressiveThermalMitigationEnabledForTesting):
(WebCore::Page::handleThermalMitigationChange):
* Source/WebCore/page/Page.h:
(WebCore::Page::isAggressiveThermalMitigationEnabled const):
* Source/WebCore/platform/cocoa/PowerSourceNotifier.h:
* Source/WebCore/platform/graphics/AnimationFrameRate.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/AnimationFrameRate.h:
* Source/WebCore/platform/graphics/MediaUsageInfo.h:
* Source/WebCore/platform/mac/PlatformScreenMac.mm:
(WebCore::collectScreenProperties):
* Source/WebCore/svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::animationFrameDelay const):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setAggressiveThermalMitigationEnabled):
(WebCore::Internals::setMediaElementRestrictions):
(WebCore::Internals::mediaUsageState const):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::Cache):
(WebKit::NetworkCache::Cache::shouldUseSpeculativeLoadManager const):
(WebKit::NetworkCache::Cache::updateSpeculativeLoadManagerEnabledState):
* Source/WebKit/NetworkProcess/cache/NetworkCache.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Tools/TestWebKitAPI/Tests/WebCore/AnimationFrameRate.cpp:
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWithUnspecifiedNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWithFullSpeedNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWith144FPSNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWith120FPSNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWith90FPSNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWith48FPSNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFrameIntervalWith30FPSNominalFramesPerSecond)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFramesPerSecondMatchNominalFrameRate)):
(TestWebKitAPI::TEST(AnimationFrameRate, preferredFramesPerSecondTarget60FPS)):
Canonical link: https://commits.webkit.org/287858@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list