Title: [232586] tags/Safari-606.1.20/Source/WebCore
- Revision
- 232586
- Author
- [email protected]
- Date
- 2018-06-07 10:24:54 -0700 (Thu, 07 Jun 2018)
Log Message
Cherry-pick r232563. rdar://problem/40439109
Display links are sometimes not notifying WebCore when fired.
https://bugs.webkit.org/show_bug.cgi?id=186367
<rdar://problem/40439109>
Reviewed by Brent Fulgham.
When the WebContent process is receiving an IPC message notifying about a screen update, all display refresh monitors
are notified by the manager in DisplayRefreshMonitorManager::displayWasUpdated(). The manager checks that the monitor
is scheduled before notifying. This is a problem, since the scheduled flag is always set to false in the
DisplayRefreshMonitor::displayDidRefresh() method, when the monitor is first notified about a screen update. This can
lead to display links running without notifying the monitors, causing extra CPU usage. It can also prevent them from
being deleted, since the monitors are not notified. Instead, we can check that the display refresh monitor is active
before notifying it. This matches the original display link implementation used when the WebContent process has
WindowServer access, where the monitors are always notified.
No new tests, since I have not been able to reproduce this in a test case yet.
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: tags/Safari-606.1.20/Source/WebCore/ChangeLog (232585 => 232586)
--- tags/Safari-606.1.20/Source/WebCore/ChangeLog 2018-06-07 17:05:08 UTC (rev 232585)
+++ tags/Safari-606.1.20/Source/WebCore/ChangeLog 2018-06-07 17:24:54 UTC (rev 232586)
@@ -1,3 +1,52 @@
+2018-06-07 Kocsen Chung <[email protected]>
+
+ Cherry-pick r232563. rdar://problem/40439109
+
+ Display links are sometimes not notifying WebCore when fired.
+ https://bugs.webkit.org/show_bug.cgi?id=186367
+ <rdar://problem/40439109>
+
+ Reviewed by Brent Fulgham.
+
+ When the WebContent process is receiving an IPC message notifying about a screen update, all display refresh monitors
+ are notified by the manager in DisplayRefreshMonitorManager::displayWasUpdated(). The manager checks that the monitor
+ is scheduled before notifying. This is a problem, since the scheduled flag is always set to false in the
+ DisplayRefreshMonitor::displayDidRefresh() method, when the monitor is first notified about a screen update. This can
+ lead to display links running without notifying the monitors, causing extra CPU usage. It can also prevent them from
+ being deleted, since the monitors are not notified. Instead, we can check that the display refresh monitor is active
+ before notifying it. This matches the original display link implementation used when the WebContent process has
+ WindowServer access, where the monitors are always notified.
+
+ No new tests, since I have not been able to reproduce this in a test case yet.
+
+ * platform/graphics/DisplayRefreshMonitorManager.cpp:
+ (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2018-06-06 Per Arne Vollan <[email protected]>
+
+ Display links are sometimes not notifying WebCore when fired.
+ https://bugs.webkit.org/show_bug.cgi?id=186367
+ <rdar://problem/40439109>
+
+ Reviewed by Brent Fulgham.
+
+ When the WebContent process is receiving an IPC message notifying about a screen update, all display refresh monitors
+ are notified by the manager in DisplayRefreshMonitorManager::displayWasUpdated(). The manager checks that the monitor
+ is scheduled before notifying. This is a problem, since the scheduled flag is always set to false in the
+ DisplayRefreshMonitor::displayDidRefresh() method, when the monitor is first notified about a screen update. This can
+ lead to display links running without notifying the monitors, causing extra CPU usage. It can also prevent them from
+ being deleted, since the monitors are not notified. Instead, we can check that the display refresh monitor is active
+ before notifying it. This matches the original display link implementation used when the WebContent process has
+ WindowServer access, where the monitors are always notified.
+
+ No new tests, since I have not been able to reproduce this in a test case yet.
+
+ * platform/graphics/DisplayRefreshMonitorManager.cpp:
+ (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
+
2018-06-06 Kocsen Chung <[email protected]>
Cherry-pick r232559. rdar://problem/39874167
Modified: tags/Safari-606.1.20/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp (232585 => 232586)
--- tags/Safari-606.1.20/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2018-06-07 17:05:08 UTC (rev 232585)
+++ tags/Safari-606.1.20/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2018-06-07 17:24:54 UTC (rev 232586)
@@ -128,7 +128,7 @@
void DisplayRefreshMonitorManager::displayWasUpdated()
{
for (auto monitor : m_monitors) {
- if (monitor->isScheduled())
+ if (monitor->isActive())
monitor->displayLinkFired();
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes