[webkit-changes] [WebKit/WebKit] 8299d7: Change compositing policy in response to memory pr...
Ryan Reno
noreply at github.com
Tue Aug 1 15:25:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8299d7639dd907163642c19c331a29c98f34ba12
https://github.com/WebKit/WebKit/commit/8299d7639dd907163642c19c331a29c98f34ba12
Author: Ryan Reno <rreno at apple.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M Source/WTF/wtf/MemoryPressureHandler.h
M Source/WebCore/rendering/RenderLayerCompositor.cpp
Log Message:
-----------
Change compositing policy in response to memory pressure status
https://bugs.webkit.org/show_bug.cgi?id=259580
rdar://109875865
Reviewed by Simon Fraser.
We switch to a more conservative compositing policy when the
MemoryPressureHandler has a change in memory usage policy at most every
2 seconds. In some cases we can enter memory warning and critical memory
pressure situations and get a foreground jetsam before this 2s has
expired. This change will respond to recent memory warning and memory
pressure notifications in order to change the compositing policy. While we
can't guarantee to not jetsam, this does improve our chances of
reducing layer counts before the system gets critically low on
memory.
* Source/WTF/wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::isUnderMemoryWarning const):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingPolicy):
Canonical link: https://commits.webkit.org/266497@main
More information about the webkit-changes
mailing list