- a/Source/WebCore/ChangeLog +20 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2018-08-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3
        Do not try to update the compositing policy when not in accelerated compositing mode
4
        https://bugs.webkit.org/show_bug.cgi?id=188787
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        RenderLayerCompositor::updateCompositingPolicy() is called very often (called from
9
        RenderLayerCompositor::cacheAcceleratedCompositingFlags()) and it uses WTF::memoryFootprint() to decide the
10
        current compositing policy. Getting the memory footprint is an expensive operation in Linux (and I suspect other
11
        non-cocoa ports too), causing an excessive CPU usage. This caused the WPE and GTK+ unit test
12
        /webkit/WebKitWebContext/uri-scheme to start timing out in the bots, because the test expects things to happen
13
        fast and that's no longer the case. We could reduce the CPU usage a lot by not trying to update the policy when
14
        not in accelerated compositing mode. We will need a solution for the accelerated compositing mode, though.
15
16
        Fixes WPE/GTK+ unit test /webkit/WebKitWebContext/uri-scheme.
17
18
        * rendering/RenderLayerCompositor.cpp:
19
        (WebCore::RenderLayerCompositor::updateCompositingPolicy): Return early when not in accelerated compositing mode.
20
1
2018-08-20  Ms2ger  <Ms2ger@igalia.com>
21
2018-08-20  Ms2ger  <Ms2ger@igalia.com>
2
22
3
        [SOUP] Check length before calling soup_message_body_append_buffer.
23
        [SOUP] Check length before calling soup_message_body_append_buffer.
- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +3 lines
Lines 368-373 void RenderLayerCompositor::cacheAcceleratedCompositingFlagsAfterLayout() a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec1
368
368
369
bool RenderLayerCompositor::updateCompositingPolicy()
369
bool RenderLayerCompositor::updateCompositingPolicy()
370
{
370
{
371
    if (!inCompositingMode())
372
        return false;
373
371
    auto currentPolicy = m_compositingPolicy;
374
    auto currentPolicy = m_compositingPolicy;
372
    if (page().compositingPolicyOverride()) {
375
    if (page().compositingPolicyOverride()) {
373
        m_compositingPolicy = page().compositingPolicyOverride().value();
376
        m_compositingPolicy = page().compositingPolicyOverride().value();

Return to Bug 188787