Permalink
Browse files

Add no-op wpe_renderer_backend_egl_offscreen_target_interface impleme…

…ntation

This should force WebKit to default back to a pbuffer-based offscreen context
without causing any crashes. Before the assumption was that the
surfaceless context functionality could be used, but that's not guaranteed.
  • Loading branch information...
zdobersek committed Oct 10, 2018
1 parent 006824d commit 5a4b58c7d6a70068d13b8404a0c970b03a856119
Showing with 24 additions and 0 deletions.
  1. +2 −0 src/fdo.cpp
  2. +1 −0 src/interfaces.h
  3. +21 −0 src/renderer-backend-egl.cpp
@@ -42,6 +42,8 @@ struct wpe_loader_interface _wpe_loader_interface = {
return &fdo_renderer_backend_egl;
if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_target_interface"))
return &fdo_renderer_backend_egl_target;
if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_offscreen_target_interface"))
return &fdo_renderer_backend_egl_offscreen_target;

return nullptr;
},
@@ -33,4 +33,5 @@ extern struct wpe_renderer_host_interface fdo_renderer_host;

extern struct wpe_renderer_backend_egl_interface fdo_renderer_backend_egl;
extern struct wpe_renderer_backend_egl_target_interface fdo_renderer_backend_egl_target;
extern struct wpe_renderer_backend_egl_offscreen_target_interface fdo_renderer_backend_egl_offscreen_target;

@@ -350,3 +350,24 @@ struct wpe_renderer_backend_egl_target_interface fdo_renderer_backend_egl_target
{
},
};

struct wpe_renderer_backend_egl_offscreen_target_interface fdo_renderer_backend_egl_offscreen_target = {
// create
[]() -> void*
{
return nullptr;
},
// destroy
[](void* data)
{
},
// initialize
[](void* data, void* backend_data)
{
},
// get_native_window
[](void* data) -> EGLNativeWindowType
{
return nullptr;
},
};

0 comments on commit 5a4b58c

Please sign in to comment.