Skip to content

Commit

Permalink
Fix mistakenly added interface definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
zhani committed Apr 22, 2024
1 parent 2be18e2 commit 6bd7b5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 65 deletions.
35 changes: 1 addition & 34 deletions src/interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <wpe/wpe.h>

#include "interfaces.h"
#include "logging.h"
#include <cstring>

extern "C" {

__attribute__((visibility("default")))
struct wpe_loader_interface _wpe_loader_interface = {
[] (const char* object_name) -> void* {
ALOGD("_wpe_loader_interface queried for object_name %s", object_name);

if (!std::strcmp(object_name, "_wpe_renderer_host_interface"))
return &android_renderer_host_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_interface"))
return &android_renderer_backend_egl_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_target_interface"))
return &android_renderer_backend_egl_target_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_offscreen_target_interface"))
return &android_renderer_backend_egl_offscreen_target_impl;

return nullptr;
},
};

}


#include <wpe/wpe.h>
#include <wpe/wpe-egl.h>
#pragma once

extern struct wpe_renderer_host_interface android_renderer_host_impl;

Expand Down
31 changes: 0 additions & 31 deletions src/ipc-messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <wpe/wpe.h>

#include "interfaces.h"
#include "logging.h"
#include <cstring>

extern "C" {

__attribute__((visibility("default")))
struct wpe_loader_interface _wpe_loader_interface = {
[] (const char* object_name) -> void* {
ALOGD("_wpe_loader_interface queried for object_name %s", object_name);

if (!std::strcmp(object_name, "_wpe_renderer_host_interface"))
return &android_renderer_host_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_interface"))
return &android_renderer_backend_egl_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_target_interface"))
return &android_renderer_backend_egl_target_impl;

if (!std::strcmp(object_name, "_wpe_renderer_backend_egl_offscreen_target_interface"))
return &android_renderer_backend_egl_offscreen_target_impl;

return nullptr;
},
};

}

#pragma once

namespace IPC {
Expand Down

0 comments on commit 6bd7b5c

Please sign in to comment.