- Revision
- 274977
- Author
- [email protected]
- Date
- 2021-03-24 15:07:51 -0700 (Wed, 24 Mar 2021)
Log Message
Add DisplayLink log channels in WebCore and WebKit
https://bugs.webkit.org/show_bug.cgi?id=223669
Reviewed by Tim Horton.
Source/WebCore:
DisplayRefreshMonitor code involves some non-trivial object
fan-out and WebProcess/UI Process interaction, and it deserves
a log channel.
* platform/Logging.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::monitorForClient):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
Source/WebKit:
DisplayRefreshMonitor code involves some non-trivial object
fan-out and WebProcess/UI Process interaction, and it deserves
a log channel.
* Platform/Logging.h:
* WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:
(WebKit::DisplayRefreshMonitorMac::displayLinkFired):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (274976 => 274977)
--- trunk/Source/WebCore/ChangeLog 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebCore/ChangeLog 2021-03-24 22:07:51 UTC (rev 274977)
@@ -1,3 +1,21 @@
+2021-03-24 Simon Fraser <[email protected]>
+
+ Add DisplayLink log channels in WebCore and WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=223669
+
+ Reviewed by Tim Horton.
+
+ DisplayRefreshMonitor code involves some non-trivial object
+ fan-out and WebProcess/UI Process interaction, and it deserves
+ a log channel.
+
+ * platform/Logging.h:
+ * platform/graphics/DisplayRefreshMonitor.cpp:
+ (WebCore::DisplayRefreshMonitor::displayDidRefresh):
+ * platform/graphics/DisplayRefreshMonitorManager.cpp:
+ (WebCore::DisplayRefreshMonitorManager::monitorForClient):
+ (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
+
2021-03-24 Philippe Normand <[email protected]>
REGRESSION(r274870) fast/canvas/webgl/texImage2D-mse-flipY-true.html and fast/canvas/webgl/texImage2D-mse-flipY-false.html are crashing
Modified: trunk/Source/WebCore/platform/Logging.h (274976 => 274977)
--- trunk/Source/WebCore/platform/Logging.h 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebCore/platform/Logging.h 2021-03-24 22:07:51 UTC (rev 274977)
@@ -50,6 +50,7 @@
M(ContentFiltering) \
M(ContentObservation) \
M(DatabaseTracker) \
+ M(DisplayLink) \
M(DisplayLists) \
M(DOMTimers) \
M(Editing) \
Modified: trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp (274976 => 274977)
--- trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp 2021-03-24 22:07:51 UTC (rev 274977)
@@ -30,6 +30,7 @@
#include "DisplayRefreshMonitorFactory.h"
#include "DisplayRefreshMonitorManager.h"
#include "Logging.h"
+#include <wtf/text/TextStream.h>
#if PLATFORM(IOS_FAMILY)
#include "DisplayRefreshMonitorIOS.h"
@@ -101,7 +102,7 @@
{
{
LockHolder lock(m_mutex);
- LOG(RequestAnimationFrame, "DisplayRefreshMonitor::displayDidRefresh(%p) - m_scheduled(%d), m_unscheduledFireCount(%d)", this, m_scheduled, m_unscheduledFireCount);
+ LOG_WITH_STREAM(DisplayLink, stream << "DisplayRefreshMonitor " << this << " displayDidRefresh for display " << displayID() << " scheduled " << m_scheduled << " unscheduledFireCount " << m_unscheduledFireCount);
if (!m_scheduled)
++m_unscheduledFireCount;
else
Modified: trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp (274976 => 274977)
--- trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp 2021-03-24 22:07:51 UTC (rev 274977)
@@ -29,6 +29,7 @@
#include "DisplayRefreshMonitor.h"
#include "DisplayRefreshMonitorClient.h"
#include "Logging.h"
+#include <wtf/text/TextStream.h>
namespace WebCore {
@@ -55,7 +56,7 @@
if (!monitor)
return nullptr;
- LOG(RequestAnimationFrame, "DisplayRefreshMonitorManager::monitorForClient() - created monitor %p", monitor.get());
+ LOG_WITH_STREAM(DisplayLink, stream << "DisplayRefreshMonitorManager::monitorForClient() - created monitor " << monitor.get() << " for display " << clientDisplayID);
monitor->addClient(client);
DisplayRefreshMonitor* result = monitor.get();
m_monitors.append({ WTFMove(monitor) });
@@ -97,8 +98,9 @@
{
if (!monitor.shouldBeTerminated())
return;
- LOG(RequestAnimationFrame, "DisplayRefreshMonitorManager::displayDidRefresh() - destroying monitor %p", &monitor);
+ LOG_WITH_STREAM(DisplayLink, stream << "DisplayRefreshMonitorManager::displayDidRefresh() - destroying monitor " << &monitor);
+
m_monitors.removeFirstMatching([&](auto& monitorWrapper) {
return monitorWrapper.monitor == &monitor;
});
Modified: trunk/Source/WebKit/ChangeLog (274976 => 274977)
--- trunk/Source/WebKit/ChangeLog 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebKit/ChangeLog 2021-03-24 22:07:51 UTC (rev 274977)
@@ -1,3 +1,18 @@
+2021-03-24 Simon Fraser <[email protected]>
+
+ Add DisplayLink log channels in WebCore and WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=223669
+
+ Reviewed by Tim Horton.
+
+ DisplayRefreshMonitor code involves some non-trivial object
+ fan-out and WebProcess/UI Process interaction, and it deserves
+ a log channel.
+
+ * Platform/Logging.h:
+ * WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp:
+ (WebKit::DisplayRefreshMonitorMac::displayLinkFired):
+
2021-03-24 Kate Cheney <[email protected]>
Remove deprecated WKMediaPlayback APIs
Modified: trunk/Source/WebKit/Platform/Logging.h (274976 => 274977)
--- trunk/Source/WebKit/Platform/Logging.h 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebKit/Platform/Logging.h 2021-03-24 22:07:51 UTC (rev 274977)
@@ -50,6 +50,7 @@
M(CacheStorage) \
M(ContentObservation) \
M(ContextMenu) \
+ M(DisplayLink) \
M(DiskPersistency) \
M(DragAndDrop) \
M(EME) \
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp (274976 => 274977)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp 2021-03-24 21:57:23 UTC (rev 274976)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp 2021-03-24 22:07:51 UTC (rev 274977)
@@ -28,11 +28,13 @@
#if PLATFORM(MAC)
+#include "Logging.h"
#include "WebProcess.h"
#include "WebProcessProxy.h"
#include "WebProcessProxyMessages.h"
#include <WebCore/DisplayRefreshMonitor.h>
#include <WebCore/RunLoopObserver.h>
+#include <wtf/text/TextStream.h>
namespace WebKit {
using namespace WebCore;
@@ -76,6 +78,8 @@
return;
m_firstCallbackInCurrentRunloop = false;
+ LOG_WITH_STREAM(DisplayLink, stream << "DisplayRefreshMonitorMac::displayLinkFired() for display " << displayID());
+
// Since we are on the main thread, we can just call handleDisplayRefreshedNotificationOnMainThread here.
handleDisplayRefreshedNotificationOnMainThread(this);
}