| Differences between
and this patch
- a/Source/WebKit2/ChangeLog +15 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2016-09-13  Emanuele Aina  <emanuele.aina@collabora.com>
2
3
        [GTK] Drop redundant wl_display_flush_clients() call
4
        https://bugs.webkit.org/show_bug.cgi?id=161684
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        The Wayland GSource::prepare() function already calls
9
        wl_display_flush_clients() at every mainloop iteration, so there's no
10
        need to further call it on Surface::commit().
11
12
        * UIProcess/gtk/WaylandCompositor.cpp:
13
        (WebKit::WaylandCompositor::Surface::commit):
14
        * UIProcess/gtk/WaylandCompositor.h:
15
1
2016-09-12  DAN SAUNDERS  <dasau@microsoft.com>
16
2016-09-12  DAN SAUNDERS  <dasau@microsoft.com>
2
17
3
        AX: WKWebView for macOS does not allow configuration of tabsToLinks
18
        AX: WKWebView for macOS does not allow configuration of tabsToLinks
- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp -7 / +3 lines
Lines 218-231 bool WaylandCompositor::Surface::prepareTextureForPainting(unsigned& texture, In a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec1
218
    return true;
218
    return true;
219
}
219
}
220
220
221
bool WaylandCompositor::Surface::commit()
221
void WaylandCompositor::Surface::commit()
222
{
222
{
223
    EGLDisplay eglDisplay = PlatformDisplay::sharedDisplay().eglDisplay();
223
    EGLDisplay eglDisplay = PlatformDisplay::sharedDisplay().eglDisplay();
224
    if (m_image != EGL_NO_IMAGE_KHR)
224
    if (m_image != EGL_NO_IMAGE_KHR)
225
        eglDestroyImage(eglDisplay, m_image);
225
        eglDestroyImage(eglDisplay, m_image);
226
    m_image = m_pendingBuffer->createImage();
226
    m_image = m_pendingBuffer->createImage();
227
    if (m_image == EGL_NO_IMAGE_KHR)
227
    if (m_image == EGL_NO_IMAGE_KHR)
228
        return false;
228
        return;
229
229
230
    makePendingBufferCurrent();
230
    makePendingBufferCurrent();
231
    if (m_webPage)
231
    if (m_webPage)
Lines 240-247 bool WaylandCompositor::Surface::commit() a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec2
240
        wl_callback_send_done(resource, 0);
240
        wl_callback_send_done(resource, 0);
241
        wl_resource_destroy(resource);
241
        wl_resource_destroy(resource);
242
    }
242
    }
243
244
    return true;
245
}
243
}
246
244
247
static const struct wl_surface_interface surfaceInterface = {
245
static const struct wl_surface_interface surfaceInterface = {
Lines 288-296 static const struct wl_surface_interface surfaceInterface = { a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp_sec3
288
        auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource));
286
        auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource));
289
        if (!surface)
287
        if (!surface)
290
            return;
288
            return;
291
289
        surface->commit();
292
        if (surface->commit())
293
            wl_display_flush_clients(wl_client_get_display(client));
294
    },
290
    },
295
    // setBufferTransformCallback
291
    // setBufferTransformCallback
296
    [](struct wl_client*, struct wl_resource*, int32_t) { },
292
    [](struct wl_client*, struct wl_resource*, int32_t) { },
- a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h -1 / +1 lines
Lines 85-91 public: a/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h_sec1
85
85
86
        void attachBuffer(struct wl_resource*);
86
        void attachBuffer(struct wl_resource*);
87
        void requestFrame(struct wl_resource*);
87
        void requestFrame(struct wl_resource*);
88
        bool commit();
88
        void commit();
89
89
90
        void setWebPage(WebPageProxy* webPage) { m_webPage = webPage; }
90
        void setWebPage(WebPageProxy* webPage) { m_webPage = webPage; }
91
        bool prepareTextureForPainting(unsigned&, WebCore::IntSize&);
91
        bool prepareTextureForPainting(unsigned&, WebCore::IntSize&);

Return to Bug 161684