Unreviewed. [GTK] Bump WPEBackend-fdo requirement to 1.3.1
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jun 2019 08:33:50 +0000 (08:33 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jun 2019 08:33:50 +0000 (08:33 +0000)
.:

* Source/cmake/OptionsGTK.cmake:

Tools:

* gtk/jhbuild.modules:
* gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch: Removed.
* gtk/wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/gtk/jhbuild.modules
Tools/gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch [deleted file]
Tools/gtk/wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch [deleted file]

index 94aa4b6..4d7e6c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. [GTK] Bump WPEBackend-fdo requirement to 1.3.1
+
+        * Source/cmake/OptionsGTK.cmake:
+
 2019-06-13  Tim Horton  <timothy_horton@apple.com>
 
         Make it possible for validate-committer-lists to dump a mailmap file
index fdb94a0..3461ad7 100644 (file)
@@ -207,7 +207,7 @@ if (USE_WPE_RENDERER)
         message(FATAL_ERROR "libwpe is required for USE_WPE_RENDERER")
     endif ()
 
-    find_package(WPEBackend-fdo 1.3.0)
+    find_package(WPEBackend-fdo 1.3.1)
     if (NOT WPEBACKEND_FDO_FOUND)
         message(FATAL_ERROR "WPEBackend-fdo is required for USE_WPE_RENDERER")
     endif ()
index c031f99..63e8fde 100644 (file)
@@ -1,3 +1,11 @@
+2019-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        Unreviewed. [GTK] Bump WPEBackend-fdo requirement to 1.3.1
+
+        * gtk/jhbuild.modules:
+        * gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch: Removed.
+        * gtk/wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch: Removed.
+
 2019-06-16  Zalan Bujtas  <zalan@apple.com>
 
         [LFC] Expand tests coverage (325 new tests -> 1198).
index d496c91..15f3d5d 100644 (file)
       <dep package="libwpe"/>
       <dep package="glib"/>
     </dependencies>
-    <branch repo="wpewebkit" module="wpebackend-fdo-1.3.0.tar.xz" version="1.3.0"
-            hash="sha256:fed9ab29f5d53cf465188da80d014f3aa067c77704f8508c6bd17971fded359d">
-      <!-- Remove this when updating to 1.3.1 -->
-      <patch file="wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch" strip="1"/>
-      <patch file="wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch" strip="1"/>
-    </branch>
+    <branch repo="wpewebkit" module="wpebackend-fdo-1.3.1.tar.xz" version="1.3.1"
+            hash="sha256:b0d136aa9ce9f94b1d06b258ed68c4a7b588b2e692d448d9c6eedb72edf56739"/>
   </cmake>
 
   <!-- Dependencies listed below this point are not thought to affect test results, and are only
diff --git a/Tools/gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch b/Tools/gtk/patches/wpebackend-fdo-Handle-the-case-of-new-target-created-for-the-same-v.patch
deleted file mode 100644 (file)
index 46a6189..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-From 13cae95a3b38899f8fd5fc39a5d25fcc9500e09a Mon Sep 17 00:00:00 2001
-From: Carlos Garcia Campos <cgarcia@igalia.com>
-Date: Thu, 30 May 2019 14:04:29 +0200
-Subject: [PATCH] Handle the case of new target created for the same view
- backend
-
-The client can remove a target and create a new one for the same view
-backend. In that case we need to unregister the current view backend in
-the wayland compositor before registering the new one. This patch renames
-WS::Instance::createSurface as registerSurface to clarify that it's not
-creating a new surface but registering a new one for the given id. Also
-ViewBackend::m_id has been renamed as m_surfaceId to clarify that's not
-the backend identifier, but the current surface identifier.
----
- src/renderer-backend-egl.cpp            |  8 +++++-
- src/view-backend-exportable-private.cpp | 35 +++++++++++++++++++++----
- src/view-backend-exportable-private.h   |  5 +++-
- src/ws.cpp                              | 12 ++++-----
- src/ws.h                                |  2 +-
- 5 files changed, 48 insertions(+), 14 deletions(-)
-
-diff --git a/src/renderer-backend-egl.cpp b/src/renderer-backend-egl.cpp
-index 726d61c..7e11d5e 100644
---- a/src/renderer-backend-egl.cpp
-+++ b/src/renderer-backend-egl.cpp
-@@ -139,6 +139,11 @@ public:
-     ~Target()
-     {
-+        if (m_wl.wpeBridgeId && m_glib.socket) {
-+            uint32_t message[] = { 0x43, m_wl.wpeBridgeId };
-+            g_socket_send(m_glib.socket, reinterpret_cast<gchar*>(message), 2 * sizeof(uint32_t), nullptr, nullptr);
-+        }
-+
-         g_clear_pointer(&m_wl.frameCallback, wl_callback_destroy);
-         g_clear_pointer(&m_wl.window, wl_egl_window_destroy);
-         g_clear_pointer(&m_wl.surface, wl_surface_destroy);
-@@ -223,6 +228,7 @@ public:
-     void bridgeConnected(uint32_t bridgeID)
-     {
-+        m_wl.wpeBridgeId = bridgeID;
-         uint32_t message[] = { 0x42, bridgeID };
-         if (m_glib.socket)
-             g_socket_send(m_glib.socket, reinterpret_cast<gchar*>(message), 2 * sizeof(uint32_t), nullptr, nullptr);
-@@ -246,11 +252,11 @@ private:
-     } m_glib;
-     struct {
--        struct wl_display* displayWrapper { nullptr };
-         struct wl_event_queue* eventQueue { nullptr };
-         struct wl_registry* registry { nullptr };
-         struct wl_compositor* compositor { nullptr };
-         struct wpe_bridge* wpeBridge { nullptr };
-+        uint32_t wpeBridgeId { 0 };
-         struct wl_surface* surface { nullptr };
-         struct wl_egl_window* window { nullptr };
-diff --git a/src/view-backend-exportable-private.cpp b/src/view-backend-exportable-private.cpp
-index d73102f..d10679b 100644
---- a/src/view-backend-exportable-private.cpp
-+++ b/src/view-backend-exportable-private.cpp
-@@ -39,7 +39,7 @@ ViewBackend::~ViewBackend()
-     for (auto* resource : m_callbackResources)
-         wl_resource_destroy(resource);
--    WS::Instance::singleton().unregisterViewBackend(m_id);
-+    unregisterSurface(m_surfaceId);
-     if (m_clientFd != -1)
-         close(m_clientFd);
-@@ -117,6 +117,24 @@ void ViewBackend::releaseBuffer(struct wl_resource* buffer_resource)
-     wl_client_flush(m_client);
- }
-+void ViewBackend::registerSurface(uint32_t surfaceId)
-+{
-+    m_surfaceId = surfaceId;
-+    m_client = WS::Instance::singleton().registerViewBackend(m_surfaceId, *this);
-+}
-+
-+void ViewBackend::unregisterSurface(uint32_t surfaceId)
-+{
-+    if (!surfaceId || m_surfaceId != surfaceId)
-+        return;
-+
-+    for (auto* resource : m_callbackResources)
-+        wl_resource_destroy(resource);
-+    m_callbackResources.clear();
-+    WS::Instance::singleton().unregisterViewBackend(m_surfaceId);
-+    m_surfaceId = 0;
-+}
-+
- gboolean ViewBackend::s_socketCallback(GSocket* socket, GIOCondition condition, gpointer data)
- {
-     if (!(condition & G_IO_IN))
-@@ -128,10 +146,17 @@ gboolean ViewBackend::s_socketCallback(GSocket* socket, GIOCondition condition,
-     if (len == -1)
-         return FALSE;
--    if (len == sizeof(uint32_t) * 2 && message[0] == 0x42) {
--        auto& viewBackend = *static_cast<ViewBackend*>(data);
--        viewBackend.m_id = message[1];
--        viewBackend.m_client = WS::Instance::singleton().registerViewBackend(viewBackend.m_id, viewBackend);
-+    if (len != sizeof(uint32_t) * 2)
-+        return TRUE;
-+
-+    auto& viewBackend = *static_cast<ViewBackend*>(data);
-+    switch (message[0]) {
-+    case 0x42:
-+        viewBackend.registerSurface(message[1]);
-+        break;
-+    case 0x43:
-+        viewBackend.unregisterSurface(message[1]);
-+        break;
-     }
-     return TRUE;
-diff --git a/src/view-backend-exportable-private.h b/src/view-backend-exportable-private.h
-index b27494e..73f3497 100644
---- a/src/view-backend-exportable-private.h
-+++ b/src/view-backend-exportable-private.h
-@@ -67,9 +67,12 @@ public:
-     void releaseBuffer(struct wl_resource* buffer_resource);
- private:
-+    void registerSurface(uint32_t);
-+    void unregisterSurface(uint32_t);
-+
-     static gboolean s_socketCallback(GSocket*, GIOCondition, gpointer);
--    uint32_t m_id { 0 };
-+    uint32_t m_surfaceId { 0 };
-     struct wl_client* m_client { nullptr };
-     ClientBundle* m_clientBundle;
-diff --git a/src/ws.cpp b/src/ws.cpp
-index a856e0b..1aac351 100644
---- a/src/ws.cpp
-+++ b/src/ws.cpp
-@@ -231,7 +231,7 @@ static const struct wpe_bridge_interface s_wpeBridgeInterface = {
-         static uint32_t bridgeID = 0;
-         ++bridgeID;
-         wpe_bridge_send_connected(resource, bridgeID);
--        Instance::singleton().createSurface(bridgeID, surface);
-+        Instance::singleton().registerSurface(bridgeID, surface);
-     },
- };
-@@ -393,7 +393,7 @@ int Instance::createClient()
-     return clientFd;
- }
--void Instance::createSurface(uint32_t id, Surface* surface)
-+void Instance::registerSurface(uint32_t id, Surface* surface)
- {
-     m_viewBackendMap.insert({ id, surface });
- }
-@@ -538,9 +538,9 @@ void Instance::foreachDmaBufModifier(std::function<void (int format, uint64_t mo
-     }
- }
--struct wl_client* Instance::registerViewBackend(uint32_t id, ExportableClient& exportableClient)
-+struct wl_client* Instance::registerViewBackend(uint32_t surfaceId, ExportableClient& exportableClient)
- {
--    auto it = m_viewBackendMap.find(id);
-+    auto it = m_viewBackendMap.find(surfaceId);
-     if (it == m_viewBackendMap.end())
-         std::abort();
-@@ -548,9 +548,9 @@ struct wl_client* Instance::registerViewBackend(uint32_t id, ExportableClient& e
-     return it->second->client;
- }
--void Instance::unregisterViewBackend(uint32_t id)
-+void Instance::unregisterViewBackend(uint32_t surfaceId)
- {
--    auto it = m_viewBackendMap.find(id);
-+    auto it = m_viewBackendMap.find(surfaceId);
-     if (it != m_viewBackendMap.end()) {
-         it->second->exportableClient = nullptr;
-         m_viewBackendMap.erase(it);
-diff --git a/src/ws.h b/src/ws.h
-index d4c2bff..5cb88e7 100644
---- a/src/ws.h
-+++ b/src/ws.h
-@@ -53,7 +53,7 @@ public:
-     int createClient();
--    void createSurface(uint32_t, Surface*);
-+    void registerSurface(uint32_t, Surface*);
-     struct wl_client* registerViewBackend(uint32_t, ExportableClient&);
-     void unregisterViewBackend(uint32_t);
--- 
-2.20.1
-
diff --git a/Tools/gtk/wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch b/Tools/gtk/wpebackend-fdo-view-backend-exportable-private-don-t-double-free-ca.patch
deleted file mode 100644 (file)
index 966fd59..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From d95588908bbdd4ba6b0fab0b98d2dcedd73a7343 Mon Sep 17 00:00:00 2001
-From: Zan Dobersek <zdobersek@igalia.com>
-Date: Mon, 10 Jun 2019 09:09:48 +0200
-Subject: [PATCH] view-backend-exportable-private: don't double-free callback
- resources during destruction.
-
----
- src/view-backend-exportable-private.cpp | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/view-backend-exportable-private.cpp b/src/view-backend-exportable-private.cpp
-index 3a1559c..8a84359 100644
---- a/src/view-backend-exportable-private.cpp
-+++ b/src/view-backend-exportable-private.cpp
-@@ -38,9 +38,6 @@ ViewBackend::ViewBackend(ClientBundle* clientBundle, struct wpe_view_backend* ba
- ViewBackend::~ViewBackend()
- {
--    for (auto* resource : m_callbackResources)
--        wl_resource_destroy(resource);
--
-     unregisterSurface(m_surfaceId);
-     if (m_clientFd != -1)
-@@ -119,6 +116,7 @@ void ViewBackend::unregisterSurface(uint32_t surfaceId)
-     for (auto* resource : m_callbackResources)
-         wl_resource_destroy(resource);
-     m_callbackResources.clear();
-+
-     WS::Instance::singleton().unregisterViewBackend(m_surfaceId);
-     m_surfaceId = 0;
- }
--- 
-2.20.1
-