WebKit Bugzilla
Attachment 370937 Details for
Bug 198371
: [CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wkgtk-wpe-host-fd.diff (text/plain), 3.04 KB, created by
Carlos Garcia Campos
on 2019-05-30 05:33:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-05-30 05:33:03 PDT
Size:
3.04 KB
patch
obsolete
>diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 58790ccf210..a75c43ba7ed 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,23 @@ >+2019-05-30 Carlos Garcia Campos <cgarcia@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 NOBODY (OOPS!). >+ >+ 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-30 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Fix memory leak introduced in r245807 >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index b0b13f78e42..5c9927e8f85 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -1156,7 +1156,7 @@ public: > #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); >diff --git a/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp b/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp >index 7cd5561e24d..96614675b6d 100644 >--- a/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp >+++ b/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp >@@ -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 @@ AcceleratedSurfaceLibWPE::~AcceleratedSurfaceLibWPE() > > 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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198371
: 370937 |
370940