Title: [274412] trunk/Source/WebKit
- Revision
- 274412
- Author
- commit-qu...@webkit.org
- Date
- 2021-03-15 04:33:29 -0700 (Mon, 15 Mar 2021)
Log Message
Simulated WebGL context screen change events should work with GPU process
https://bugs.webkit.org/show_bug.cgi?id=223121
Patch by Kimmo Kinnunen <kkinnu...@apple.com> on 2021-03-15
Reviewed by Darin Adler.
Add a hunk missing from "WebGL context screen change events should work with GPU process"
that implements the context-specific event for simulating the context change.
Fixes
fast/canvas/webgl/webglcontextchangedevent.html
* GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::simulateEventForTesting):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (274411 => 274412)
--- trunk/Source/WebKit/ChangeLog 2021-03-15 11:27:16 UTC (rev 274411)
+++ trunk/Source/WebKit/ChangeLog 2021-03-15 11:33:29 UTC (rev 274412)
@@ -1,3 +1,19 @@
+2021-03-15 Kimmo Kinnunen <kkinnu...@apple.com>
+
+ Simulated WebGL context screen change events should work with GPU process
+ https://bugs.webkit.org/show_bug.cgi?id=223121
+
+ Reviewed by Darin Adler.
+
+ Add a hunk missing from "WebGL context screen change events should work with GPU process"
+ that implements the context-specific event for simulating the context change.
+
+ Fixes
+ fast/canvas/webgl/webglcontextchangedevent.html
+
+ * GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
+ (WebKit::RemoteGraphicsContextGL::simulateEventForTesting):
+
2021-03-13 Peng Liu <peng.l...@apple.com>
[GPUP][MSE] MediaSource::buffered and MediaSource::activeSourceBuffers do not update in the same run loop as MediaSource::endOfStream()
Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (274411 => 274412)
--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2021-03-15 11:27:16 UTC (rev 274411)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2021-03-15 11:33:29 UTC (rev 274412)
@@ -681,14 +681,22 @@
void GPUConnectionToWebProcess::displayConfigurationChanged(CGDirectDisplayID, CGDisplayChangeSummaryFlags flags)
{
#if ENABLE(WEBGL)
- if (flags & kCGDisplaySetModeFlag) {
- for (auto& context : m_remoteGraphicsContextGLMap.values())
- context->displayWasReconfigured();
- }
+ if (flags & kCGDisplaySetModeFlag)
+ dispatchDisplayWasReconfigured();
+#else
+ UNUSED_VARIABLE(flags);
#endif
}
#endif
+#if PLATFORM(MAC) && ENABLE(WEBGL)
+void GPUConnectionToWebProcess::dispatchDisplayWasReconfigured()
+{
+ for (auto& context : m_remoteGraphicsContextGLMap.values())
+ context->displayWasReconfigured();
+}
+#endif
+
#if ENABLE(VP9)
void GPUConnectionToWebProcess::enableVP9Decoders(bool shouldEnableVP8Decoder, bool shouldEnableVP9Decoder, bool shouldEnableVP9SWDecoder)
{
Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h (274411 => 274412)
--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h 2021-03-15 11:27:16 UTC (rev 274411)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h 2021-03-15 11:33:29 UTC (rev 274412)
@@ -114,6 +114,9 @@
#if PLATFORM(MAC)
void displayConfigurationChanged(CGDirectDisplayID, CGDisplayChangeSummaryFlags);
#endif
+#if PLATFORM(MAC) && ENABLE(WEBGL)
+ void dispatchDisplayWasReconfiguredForTesting() { dispatchDisplayWasReconfigured(); };
+#endif
#if HAVE(TASK_IDENTITY_TOKEN)
task_id_token_t webProcessIdentityToken() const { return static_cast<task_id_token_t>(m_webProcessIdentityToken.sendRight()); }
@@ -201,6 +204,10 @@
// NowPlayingManager::Client
void didReceiveRemoteControlCommand(WebCore::PlatformMediaSession::RemoteControlCommandType, const WebCore::PlatformMediaSession::RemoteCommandArgument&) final;
+#if PLATFORM(MAC) && ENABLE(WEBGL)
+ void dispatchDisplayWasReconfigured();
+#endif
+
RefPtr<Logger> m_logger;
Ref<IPC::Connection> m_connection;
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp (274411 => 274412)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp 2021-03-15 11:27:16 UTC (rev 274411)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp 2021-03-15 11:33:29 UTC (rev 274412)
@@ -273,6 +273,15 @@
});
return;
}
+ if (event == WebCore::GraphicsContextGLOpenGL::SimulatedEventForTesting::ContextChange) {
+#if PLATFORM(MAC)
+ callOnMainRunLoop([weakConnection = m_gpuConnectionToWebProcess]() {
+ if (auto connection = weakConnection.get())
+ connection->dispatchDisplayWasReconfiguredForTesting();
+ });
+#endif
+ return;
+ }
m_context->simulateEventForTesting(event);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes