Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 8299d76. rdar://problem/109875865
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 Identifier: 265870.289@safari-7616.1.27.10-branch
- Loading branch information