Skip to content
Permalink
Browse files
[GTK] Drop redundant wl_display_flush_clients() call
https://bugs.webkit.org/show_bug.cgi?id=161904

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2016-10-08
Reviewed by Michael Catanzaro.

The Wayland GSource::prepare() function already calls
wl_display_flush_clients() at every mainloop iteration, so there's no
need to further call it on Surface::commit().

* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::commit):
* UIProcess/gtk/WaylandCompositor.h:

Canonical link: https://commits.webkit.org/181009@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
em- authored and webkit-commit-queue committed Oct 8, 2016
1 parent e5a1530 commit 1834e97a98ec912c85b09b1f5761b9981f3f10e3
Showing with 19 additions and 8 deletions.
  1. +15 −0 Source/WebKit2/ChangeLog
  2. +3 −7 Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp
  3. +1 −1 Source/WebKit2/UIProcess/gtk/WaylandCompositor.h
@@ -1,3 +1,18 @@
2016-10-08 Emanuele Aina <emanuele.aina@collabora.com>

[GTK] Drop redundant wl_display_flush_clients() call
https://bugs.webkit.org/show_bug.cgi?id=161904

Reviewed by Michael Catanzaro.

The Wayland GSource::prepare() function already calls
wl_display_flush_clients() at every mainloop iteration, so there's no
need to further call it on Surface::commit().

* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::commit):
* UIProcess/gtk/WaylandCompositor.h:

2016-10-06 Darin Adler <darin@apple.com>

Next step on moving to modern way to return DOM exceptions
@@ -218,14 +218,14 @@ bool WaylandCompositor::Surface::prepareTextureForPainting(unsigned& texture, In
return true;
}

bool WaylandCompositor::Surface::commit()
void WaylandCompositor::Surface::commit()
{
EGLDisplay eglDisplay = PlatformDisplay::sharedDisplay().eglDisplay();
if (m_image != EGL_NO_IMAGE_KHR)
eglDestroyImage(eglDisplay, m_image);
m_image = m_pendingBuffer->createImage();
if (m_image == EGL_NO_IMAGE_KHR)
return false;
return;

makePendingBufferCurrent();
if (m_webPage)
@@ -240,8 +240,6 @@ bool WaylandCompositor::Surface::commit()
wl_callback_send_done(resource, 0);
wl_resource_destroy(resource);
}

return true;
}

static const struct wl_surface_interface surfaceInterface = {
@@ -288,9 +286,7 @@ static const struct wl_surface_interface surfaceInterface = {
auto* surface = static_cast<WaylandCompositor::Surface*>(wl_resource_get_user_data(resource));
if (!surface)
return;

if (surface->commit())
wl_display_flush_clients(wl_client_get_display(client));
surface->commit();
},
// setBufferTransformCallback
[](struct wl_client*, struct wl_resource*, int32_t) { },
@@ -85,7 +85,7 @@ class WaylandCompositor {

void attachBuffer(struct wl_resource*);
void requestFrame(struct wl_resource*);
bool commit();
void commit();

void setWebPage(WebPageProxy* webPage) { m_webPage = webPage; }
bool prepareTextureForPainting(unsigned&, WebCore::IntSize&);

0 comments on commit 1834e97

Please sign in to comment.