Title: [279329] releases/WebKitGTK/webkit-2.32/Source/WebKit
- Revision
- 279329
- Author
- [email protected]
- Date
- 2021-06-28 04:49:41 -0700 (Mon, 28 Jun 2021)
Log Message
Merge r277998 - [CoordinatedGraphics] Handle null native surface handle for surfaceless rendering
https://bugs.webkit.org/show_bug.cgi?id=226165
Patch by Zan Dobersek <[email protected]> on 2021-05-24
Reviewed by Philippe Normand.
During ThreadedCompositor initialization, a null native surface handle
would represent a surfaceless rendering target. Assuming corresponding
driver support for this behavior, the GL context creation would still
succeed and composition could be performed.
To support this behavior, the GL context is now spawned first, and if
successful, the scene is set as active. But in case of a null native
surface (i.e. surfaceless rendering), the painting has to be mirrored
by default because of the OpenGL coordinate system being the immediate
coordinate system inside which we end up working.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::m_displayRefreshMonitor):
(WebKit::ThreadedCompositor::createGLContext):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog (279328 => 279329)
--- releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog 2021-06-28 10:47:51 UTC (rev 279328)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog 2021-06-28 11:49:41 UTC (rev 279329)
@@ -1,3 +1,25 @@
+2021-05-24 Zan Dobersek <[email protected]>
+
+ [CoordinatedGraphics] Handle null native surface handle for surfaceless rendering
+ https://bugs.webkit.org/show_bug.cgi?id=226165
+
+ Reviewed by Philippe Normand.
+
+ During ThreadedCompositor initialization, a null native surface handle
+ would represent a surfaceless rendering target. Assuming corresponding
+ driver support for this behavior, the GL context creation would still
+ succeed and composition could be performed.
+
+ To support this behavior, the GL context is now spawned first, and if
+ successful, the scene is set as active. But in case of a null native
+ surface (i.e. surfaceless rendering), the painting has to be mirrored
+ by default because of the OpenGL coordinate system being the immediate
+ coordinate system inside which we end up working.
+
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+ (WebKit::m_displayRefreshMonitor):
+ (WebKit::ThreadedCompositor::createGLContext):
+
2021-05-10 Carlos Garcia Campos <[email protected]>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.32.1 release
Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (279328 => 279329)
--- releases/WebKitGTK/webkit-2.32/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2021-06-28 10:47:51 UTC (rev 279328)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2021-06-28 11:49:41 UTC (rev 279329)
@@ -70,9 +70,12 @@
m_scene = adoptRef(new CoordinatedGraphicsScene(this));
m_nativeSurfaceHandle = m_client.nativeSurfaceHandleForCompositing();
- m_scene->setActive(!!m_nativeSurfaceHandle);
- if (m_nativeSurfaceHandle)
- createGLContext();
+ createGLContext();
+ if (m_context) {
+ if (!m_nativeSurfaceHandle)
+ m_paintFlags |= TextureMapper::PaintingMirrored;
+ m_scene->setActive(true);
+ }
});
}
@@ -84,8 +87,6 @@
{
ASSERT(!RunLoop::isMain());
- ASSERT(m_nativeSurfaceHandle);
-
// GLNativeWindowType depends on the EGL implementation: reinterpret_cast works
// for pointers (only if they are 64-bit wide and not for other cases), and static_cast for
// numeric types (and when needed they get extended to 64-bit) but not for pointers. Using
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes