Title: [245956] trunk/Source/WebKit
- Revision
- 245956
- Author
- carlo...@webkit.org
- Date
- 2019-05-31 01:15:09 -0700 (Fri, 31 May 2019)
Log Message
[CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target
https://bugs.webkit.org/show_bug.cgi?id=198371
Reviewed by Michael Catanzaro.
We are assuming that there will always be only one target for a web page. In the GTK port we destroy the render
target when leaving AC mode, and a new one is created when re-entering AC mode. Since the file descriptor is
released on the first target and adopted by libwpe, the second target passes -1 as host fd to libwpe, and the
new surface created by the target is not properly registered in the wayland compositor. That means that frame
requests for the new target are simply ignored by the wayland compositor, it returns early on surfacxe frame
when the surface doesn't have a view backend client.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::hostFileDescriptor const): Rename it and make it const.
* WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:
(WebKit::AcceleratedSurfaceLibWPE::initialize): Pass a duplicated file descriptor to
wpe_renderer_backend_egl_target_create().
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (245955 => 245956)
--- trunk/Source/WebKit/ChangeLog 2019-05-31 08:13:56 UTC (rev 245955)
+++ trunk/Source/WebKit/ChangeLog 2019-05-31 08:15:09 UTC (rev 245956)
@@ -1,5 +1,25 @@
2019-05-31 Carlos Garcia Campos <cgar...@igalia.com>
+ [CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target
+ https://bugs.webkit.org/show_bug.cgi?id=198371
+
+ Reviewed by Michael Catanzaro.
+
+ We are assuming that there will always be only one target for a web page. In the GTK port we destroy the render
+ target when leaving AC mode, and a new one is created when re-entering AC mode. Since the file descriptor is
+ released on the first target and adopted by libwpe, the second target passes -1 as host fd to libwpe, and the
+ new surface created by the target is not properly registered in the wayland compositor. That means that frame
+ requests for the new target are simply ignored by the wayland compositor, it returns early on surfacxe frame
+ when the surface doesn't have a view backend client.
+
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::hostFileDescriptor const): Rename it and make it const.
+ * WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:
+ (WebKit::AcceleratedSurfaceLibWPE::initialize): Pass a duplicated file descriptor to
+ wpe_renderer_backend_egl_target_create().
+
+2019-05-31 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK] Fix memory leak introduced in r245807
https://bugs.webkit.org/show_bug.cgi?id=198369
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (245955 => 245956)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-05-31 08:13:56 UTC (rev 245955)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-05-31 08:15:09 UTC (rev 245956)
@@ -1156,7 +1156,7 @@
#endif
#if USE(WPE_RENDERER)
- int releaseHostFileDescriptor() { return m_hostFileDescriptor.releaseFileDescriptor(); }
+ int hostFileDescriptor() const { return m_hostFileDescriptor.fileDescriptor(); }
#endif
void updateCurrentModifierState(OptionSet<WebCore::PlatformEvent::Modifier> modifiers);
Modified: trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp (245955 => 245956)
--- trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp 2019-05-31 08:13:56 UTC (rev 245955)
+++ trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp 2019-05-31 08:15:09 UTC (rev 245956)
@@ -31,6 +31,7 @@
#include "WebPage.h"
#include <WebCore/PlatformDisplayLibWPE.h>
#include <wpe/wpe-egl.h>
+#include <wtf/UniStdExtras.h>
namespace WebKit {
using namespace WebCore;
@@ -52,7 +53,7 @@
void AcceleratedSurfaceLibWPE::initialize()
{
- m_backend = wpe_renderer_backend_egl_target_create(m_webPage.releaseHostFileDescriptor());
+ m_backend = wpe_renderer_backend_egl_target_create(dupCloseOnExec(m_webPage.hostFileDescriptor()));
static struct wpe_renderer_backend_egl_target_client s_client = {
// frame_complete
[](void* data)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes