Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/ThirdParty/WPE-platform/CMakeLists.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ option(USE_WPE_BACKEND_BCM_NEXUS "Whether to enable support for the BCM_NEXUS WP
option(USE_WPE_BACKEND_BCM_NEXUS_WAYLAND "Whether to enable support for the BCM_NEXUS Wayland WPE backend" OFF)
option(USE_WPE_BACKEND_BCM_RPI "Whether to enable support for the BCM_RPi WPE backend" OFF)
option(USE_WPE_BACKEND_INTEL_CE "Whether to enable support for the Intel CE WPE backend" OFF)
option(USE_WPE_BACKEND_STM "Whether to enable support for the STM WPE backend" OFF)
option(USE_WPE_BACKEND_WAYLAND_EGL "Whether to enable support for the wayland-egl WPE backend" OFF)
option(USE_WPE_BACKEND_WESTEROS "Whether to enable support for the Westeros WPE backend" OFF)

# TODO
Expand DownExpand Up@@ -95,8 +95,8 @@ if (USE_WPE_BACKEND_INTEL_CE)
include(src/intelce/CMakeLists.txt)
endif ()

if (USE_WPE_BACKEND_STM)
include(src/stm/CMakeLists.txt)
if (USE_WPE_BACKEND_WAYLAND_EGL)
include(src/wayland-egl/CMakeLists.txt)
endif ()

if (USE_WPE_BACKEND_WESTEROS)
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,7 +68,7 @@ class ViewBackend : public IPC::Host::Handler {
};

private:
Display& m_display;
Wayland::Display& m_display;
struct wpe_view_backend* m_backend;

struct wl_surface* m_surface;
Expand DownExpand Up@@ -147,7 +147,7 @@ static const struct wl_nsc_listener g_nscListener = {
};

ViewBackend::ViewBackend(struct wpe_view_backend* backend)
: m_display(Display::singleton())
: m_display(Wayland::Display::singleton())
, m_backend(backend)
{
m_ipcHost.initialize(*this);
Expand Down
14 changes: 7 additions & 7 deletions Source/ThirdParty/WPE-platform/src/loader-impl.cpp
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,8 @@
#include "intelce/interfaces.h"
#endif

#ifdef BACKEND_STM
#include "stm/interfaces.h"
#ifdef BACKEND_WAYLAND_EGL
#include "wayland-egl/interfaces.h"
#endif

#ifdef BACKEND_WESTEROS
Expand DownExpand Up@@ -116,16 +116,16 @@ struct wpe_loader_interface _wpe_loader_interface = {
return &intelce_view_backend_interface;
#endif

#ifdef BACKEND_STM
#ifdef BACKEND_WAYLAND_EGL
if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_interface"))
return &stm_renderer_backend_egl_interface;
return &wayland_egl_renderer_backend_egl_interface;
if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_target_interface"))
return &stm_renderer_backend_egl_target_interface;
return &wayland_egl_renderer_backend_egl_target_interface;
if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_offscreen_target_interface"))
return &stm_renderer_backend_egl_offscreen_target_interface;
return &wayland_egl_renderer_backend_egl_offscreen_target_interface;

if (!std::strcmp(object_name, "_wpe_view_backend_interface"))
return &stm_view_backend_interface;
return &wayland_egl_view_backend_interface;
#endif

#ifdef BACKEND_WESTEROS
Expand Down
6 changes: 0 additions & 6 deletions Source/ThirdParty/WPE-platform/src/stm/CMakeLists.txt

This file was deleted.

101 changes: 0 additions & 101 deletions Source/ThirdParty/WPE-platform/src/stm/renderer-backend.cpp

This file was deleted.

22 changes: 22 additions & 0 deletions Source/ThirdParty/WPE-platform/src/wayland-egl/CMakeLists.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
find_package(Wayland REQUIRED)
find_package(WaylandEGL REQUIRED)

add_definitions(-DBACKEND_WAYLAND_EGL=1)

list(APPEND WPE_PLATFORM_INCLUDE_DIRECTORIES
"${WPE_PLATFORM_SOURCE_DIR}/src/wayland"
${WAYLAND_INCLUDE_DIRS}
${WAYLAND_EGL_INCLUDE_DIRS}
)

list(APPEND WPE_PLATFORM_LIBRARIES
${WAYLAND_LIBRARIES}
${WAYLAND_EGL_LIBRARIES}
)

list(APPEND WPE_PLATFORM_SOURCES
src/wayland-egl/renderer-backend.cpp
src/wayland-egl/view-backend.cpp
src/wayland/protocols/xdg-shell-protocol.c
src/wayland/display.cpp
)
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,8 +25,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef stm_interfaces_h
#define stm_interfaces_h
#ifndef wayland_egl_interfaces_h
#define wayland_egl_interfaces_h

#include <wpe/renderer-backend-egl.h>
#include <wpe/view-backend.h>
Expand All@@ -35,14 +35,14 @@
extern "C" {
#endif

extern struct wpe_renderer_backend_egl_interface stm_renderer_backend_egl_interface;
extern struct wpe_renderer_backend_egl_target_interface stm_renderer_backend_egl_target_interface;
extern struct wpe_renderer_backend_egl_offscreen_target_interface stm_renderer_backend_egl_offscreen_target_interface;
extern struct wpe_renderer_backend_egl_interface wayland_egl_renderer_backend_egl_interface;
extern struct wpe_renderer_backend_egl_target_interface wayland_egl_renderer_backend_egl_target_interface;
extern struct wpe_renderer_backend_egl_offscreen_target_interface wayland_egl_renderer_backend_egl_offscreen_target_interface;

extern struct wpe_view_backend_interface stm_view_backend_interface;
extern struct wpe_view_backend_interface wayland_egl_view_backend_interface;

#ifdef __cplusplus
}
#endif

#endif // stm_interfaces_h
#endif // wayland_egl_interfaces_h
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2015, 2016 Igalia S.L.
* Copyright (C) 2015, 2016 Metrological
* Copyright (C) 2016 SoftAtHome
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All@@ -25,29 +26,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <wpe/view-backend.h>
#ifndef wpe_platform_ipc_wayland_egl_h
#define wpe_platform_ipc_wayland_egl_h

extern "C" {
#include <memory>
#include <stdint.h>

struct wpe_view_backend_interface stm_view_backend_interface = {
// create
[](void*, struct wpe_view_backend* backend) -> void*
namespace IPC {

namespace WaylandEGL {

struct BufferCommit {
uint8_t padding[24];

static const uint64_t code = 1;
static void construct(Message& message)
{
return nullptr;
},
// destroy
[](void* data)
message.messageCode = code;
}
static BufferCommit& cast(Message& message)
{
},
// initialize
[](void* data)
return *reinterpret_cast<BufferCommit*>(std::addressof(message.messageData));
}
};
static_assert(sizeof(BufferCommit) == Message::dataSize, "BufferCommit is of correct size");

struct FrameComplete {
int8_t padding[24];

static const uint64_t code = 2;
static void construct(Message& message)
{
},
// get_renderer_host_fd
[](void* data) -> int
message.messageCode = code;
}
static FrameComplete& cast(Message& message)
{
return -1;
},
return *reinterpret_cast<FrameComplete*>(std::addressof(message.messageData));
}
};
static_assert(sizeof(FrameComplete) == Message::dataSize, "FrameComplete is of correct size");

} // namespace WaylandEGL

} // namespace IPC

}
#endif // wpe_platform_ipc_wayland_egl_h
Loading