Title: [235309] releases/WebKitGTK/webkit-2.22/Source/WebCore
Revision
235309
Author
carlo...@webkit.org
Date
2018-08-24 01:10:48 -0700 (Fri, 24 Aug 2018)

Log Message

Merge r235162 - Do not try to update the compositing policy when not in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=188787

Reviewed by Simon Fraser.

RenderLayerCompositor::updateCompositingPolicy() is called very often (called from
RenderLayerCompositor::cacheAcceleratedCompositingFlags()) and it uses WTF::memoryFootprint() to decide the
current compositing policy. Getting the memory footprint is an expensive operation in Linux (and I suspect other
non-cocoa ports too), causing an excessive CPU usage. This caused the WPE and GTK+ unit test
/webkit/WebKitWebContext/uri-scheme to start timing out in the bots, because the test expects things to happen
fast and that's no longer the case. We could reduce the CPU usage a lot by not trying to update the policy when
not in accelerated compositing mode. We will need a solution for the accelerated compositing mode, though.

Fixes WPE/GTK+ unit test /webkit/WebKitWebContext/uri-scheme.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingPolicy): Return early when not in accelerated compositing mode.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (235308 => 235309)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-08-24 08:10:41 UTC (rev 235308)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-08-24 08:10:48 UTC (rev 235309)
@@ -1,3 +1,23 @@
+2018-08-22  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        Do not try to update the compositing policy when not in accelerated compositing mode
+        https://bugs.webkit.org/show_bug.cgi?id=188787
+
+        Reviewed by Simon Fraser.
+
+        RenderLayerCompositor::updateCompositingPolicy() is called very often (called from
+        RenderLayerCompositor::cacheAcceleratedCompositingFlags()) and it uses WTF::memoryFootprint() to decide the
+        current compositing policy. Getting the memory footprint is an expensive operation in Linux (and I suspect other
+        non-cocoa ports too), causing an excessive CPU usage. This caused the WPE and GTK+ unit test
+        /webkit/WebKitWebContext/uri-scheme to start timing out in the bots, because the test expects things to happen
+        fast and that's no longer the case. We could reduce the CPU usage a lot by not trying to update the policy when
+        not in accelerated compositing mode. We will need a solution for the accelerated compositing mode, though.
+
+        Fixes WPE/GTK+ unit test /webkit/WebKitWebContext/uri-scheme.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateCompositingPolicy): Return early when not in accelerated compositing mode.
+
 2018-08-21  Ryosuke Niwa  <rn...@webkit.org>
 
         Replace booleans for modifier keys in UIEventWithKeyState with OptionSet<Modifier>

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/rendering/RenderLayerCompositor.cpp (235308 => 235309)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-08-24 08:10:41 UTC (rev 235308)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/rendering/RenderLayerCompositor.cpp	2018-08-24 08:10:48 UTC (rev 235309)
@@ -368,6 +368,9 @@
 
 bool RenderLayerCompositor::updateCompositingPolicy()
 {
+    if (!inCompositingMode())
+        return false;
+
     auto currentPolicy = m_compositingPolicy;
     if (page().compositingPolicyOverride()) {
         m_compositingPolicy = page().compositingPolicyOverride().value();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to