⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245956 in webkit


Ignore:
Timestamp:
May 31, 2019, 1:15:09 AM (7 years ago)
Author:
Carlos Garcia Campos
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().

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245955 r245956  
     12019-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [CoordinatedGraphics] WPERenderer: do not release the host file descritor when initializing the render target
     4        https://bugs.webkit.org/show_bug.cgi?id=198371
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        We are assuming that there will always be only one target for a web page. In the GTK port we destroy the render
     9        target when leaving AC mode, and a new one is created when re-entering AC mode. Since the file descriptor is
     10        released on the first target and adopted by libwpe, the second target passes -1 as host fd to libwpe, and the
     11        new surface created by the target is not properly registered in the wayland compositor. That means that frame
     12        requests for the new target are simply ignored by the wayland compositor, it returns early on surfacxe frame
     13        when the surface doesn't have a view backend client.
     14
     15        * WebProcess/WebPage/WebPage.h:
     16        (WebKit::WebPage::hostFileDescriptor const): Rename it and make it const.
     17        * WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp:
     18        (WebKit::AcceleratedSurfaceLibWPE::initialize): Pass a duplicated file descriptor to
     19        wpe_renderer_backend_egl_target_create().
     20
    1212019-05-31  Carlos Garcia Campos  <cgarcia@igalia.com>
    222
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r245807 r245956  
    11571157
    11581158#if USE(WPE_RENDERER)
    1159     int releaseHostFileDescriptor() { return m_hostFileDescriptor.releaseFileDescriptor(); }
     1159    int hostFileDescriptor() const { return m_hostFileDescriptor.fileDescriptor(); }
    11601160#endif
    11611161
  • trunk/Source/WebKit/WebProcess/WebPage/libwpe/AcceleratedSurfaceLibWPE.cpp

    r245807 r245956  
    3232#include <WebCore/PlatformDisplayLibWPE.h>
    3333#include <wpe/wpe-egl.h>
     34#include <wtf/UniStdExtras.h>
    3435
    3536namespace WebKit {
     
    5354void AcceleratedSurfaceLibWPE::initialize()
    5455{
    55     m_backend = wpe_renderer_backend_egl_target_create(m_webPage.releaseHostFileDescriptor());
     56    m_backend = wpe_renderer_backend_egl_target_create(dupCloseOnExec(m_webPage.hostFileDescriptor()));
    5657    static struct wpe_renderer_backend_egl_target_client s_client = {
    5758        // frame_complete
Note: See TracChangeset for help on using the changeset viewer.