cog: adapt .bbappend to Yocto 3.2

Update the version from 0.7.1 to 0.8.0 and remove two patches that are already
being applied in meta-webkit.

https://onedigi.atlassian.net/browse/DEL-7545

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2021-05-27 10:58:53 +02:00
parent 3df077d0ff
commit 00e1167f7c
6 changed files with 12 additions and 121 deletions

View File

@ -1,6 +1,6 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com> From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Tue, 10 Nov 2020 16:32:15 +0100 Date: Tue, 10 Nov 2020 16:32:15 +0100
Subject: [PATCH 3/4] cog: remove the --platform parameter and hardcode the FDO Subject: [PATCH 1/2] cog: remove the --platform parameter and hardcode the FDO
platform platform
We don't want users to accidentally generate errors by using different We don't want users to accidentally generate errors by using different

View File

@ -1,84 +0,0 @@
From: Zan Dobersek <zdobersek@igalia.com>
Date: Tue, 10 Nov 2020 09:23:16 +0100
Subject: [PATCH 1/4] platform: add a common EGL proc address loader with dlsym
fallback
Provide a common EGL proc address loader function that incorporates
a dlsym-based fallback in case eglGetProcAddress() refuses to find
an otherwise-existing entrypoint.
This should avoid some drivers that fail to handle proc address
requests for specific entrypoints, but have those entrypoints
exported as regular symbols loadable through dlsym().
---
platform/cog-platform-drm.c | 4 +++-
platform/cog-platform-fdo.c | 4 +++-
platform/common/egl-proc-address.h | 15 +++++++++++++++
3 files changed, 21 insertions(+), 2 deletions(-)
create mode 100644 platform/common/egl-proc-address.h
diff --git a/platform/cog-platform-drm.c b/platform/cog-platform-drm.c
index 6fa4a25..27b4521 100644
--- a/platform/cog-platform-drm.c
+++ b/platform/cog-platform-drm.c
@@ -16,6 +16,8 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include "common/egl-proc-address.h"
+
#if !defined(EGL_EXT_platform_base)
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
@@ -379,7 +381,7 @@ init_egl (void)
{
static PFNEGLGETPLATFORMDISPLAYEXTPROC s_eglGetPlatformDisplay = NULL;
if (!s_eglGetPlatformDisplay)
- s_eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress ("eglGetPlatformDisplayEXT");
+ s_eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) load_egl_proc_address ("eglGetPlatformDisplayEXT");
if (s_eglGetPlatformDisplay)
egl_data.display = s_eglGetPlatformDisplay (EGL_PLATFORM_GBM_KHR, gbm_data.device, NULL);
diff --git a/platform/cog-platform-fdo.c b/platform/cog-platform-fdo.c
index 960bc98..7bdf075 100644
--- a/platform/cog-platform-fdo.c
+++ b/platform/cog-platform-fdo.c
@@ -32,6 +32,8 @@
#include <xkbcommon/xkbcommon-compose.h>
#include <locale.h>
+#include "common/egl-proc-address.h"
+
#include "xdg-shell-client.h"
#include "fullscreen-shell-unstable-v1-client.h"
#include "presentation-time-client.h"
@@ -1586,7 +1588,7 @@ on_export_fdo_egl_image(void *data, struct wpe_fdo_egl_exported_image *image)
s_eglCreateWaylandBufferFromImageWL;
if (s_eglCreateWaylandBufferFromImageWL == NULL) {
s_eglCreateWaylandBufferFromImageWL = (PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL)
- eglGetProcAddress ("eglCreateWaylandBufferFromImageWL");
+ load_egl_proc_address ("eglCreateWaylandBufferFromImageWL");
g_assert (s_eglCreateWaylandBufferFromImageWL);
}
diff --git a/platform/common/egl-proc-address.h b/platform/common/egl-proc-address.h
new file mode 100644
index 0000000..44dd6a9
--- /dev/null
+++ b/platform/common/egl-proc-address.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#define __USE_GNU
+#include <dlfcn.h>
+
+#include <EGL/egl.h>
+
+static void*
+load_egl_proc_address (const char *name)
+{
+ void *proc_address = eglGetProcAddress (name);
+ if (!proc_address)
+ proc_address = dlsym (RTLD_NEXT, name);
+ return proc_address;
+}

View File

@ -1,6 +1,6 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com> From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Tue, 10 Nov 2020 16:36:21 +0100 Date: Tue, 10 Nov 2020 16:36:21 +0100
Subject: [PATCH 4/4] cog-platform-fdo: always use fullscreen mode Subject: [PATCH 2/2] cog-platform-fdo: always use fullscreen mode
Otherwise, the browser will spawn on a random place on the desktop every time. Otherwise, the browser will spawn on a random place on the desktop every time.

View File

@ -1,23 +0,0 @@
From: Zan Dobersek <zdobersek@igalia.com>
Date: Tue, 10 Nov 2020 09:42:01 +0100
Subject: [PATCH 2/4] egl-proc-address.h: add a license header.
---
platform/common/egl-proc-address.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/platform/common/egl-proc-address.h b/platform/common/egl-proc-address.h
index 44dd6a9..83ad90a 100644
--- a/platform/common/egl-proc-address.h
+++ b/platform/common/egl-proc-address.h
@@ -1,3 +1,10 @@
+/*
+ * egl-proc-address.h
+ * Copyright (C) 2020 Igalia S.L.
+ *
+ * Distributed under terms of the MIT license.
+ */
+
#pragma once
#define __USE_GNU

View File

@ -1,12 +0,0 @@
# Copyright 2020, Digi International Inc.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append = " \
file://0001-platform-add-a-common-EGL-proc-address-loader-with-d.patch \
file://0002-egl-proc-address.h-add-a-license-header.patch \
file://0003-cog-remove-the-platform-parameter-and-hardcode-the-F.patch \
file://0004-cog-platform-fdo-always-use-fullscreen-mode.patch \
"
EXTRA_OECMAKE += "-DCOG_HOME_URI=http://127.0.0.1/"

View File

@ -0,0 +1,10 @@
# Copyright 2020-2021 Digi International Inc.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append = " \
file://0001-cog-remove-the-platform-parameter-and-hardcode-the-F.patch \
file://0002-cog-platform-fdo-always-use-fullscreen-mode.patch \
"
EXTRA_OECMAKE += "-DCOG_HOME_URI=http://127.0.0.1/"