Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
53b8071e
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53b8071e
编写于
1月 26, 2017
作者:
S
Simon Fels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
On systems we run against Mir we also need to build against it
上级
17bdff54
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
2 deletion
+21
-2
CMakeLists.txt
CMakeLists.txt
+4
-0
src/CMakeLists.txt
src/CMakeLists.txt
+4
-0
src/anbox/ubuntu/window.cpp
src/anbox/ubuntu/window.cpp
+13
-2
未找到文件。
CMakeLists.txt
浏览文件 @
53b8071e
...
...
@@ -67,6 +67,10 @@ pkg_check_modules(SDL2 sdl2 REQUIRED)
pkg_check_modules
(
DBUS_CPP dbus-cpp REQUIRED
)
pkg_check_modules
(
DBUS dbus-1 REQUIRED
)
pkg_check_modules
(
LXC lxc REQUIRED
)
pkg_check_modules
(
MIRCLIENT mirclient
)
if
(
MIRCLIENT_FOUND
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DMIR_SUPPORT"
)
endif
()
#####################################################################
# Enable code coverage calculation with gcov/gcovr/lcov
...
...
src/CMakeLists.txt
浏览文件 @
53b8071e
...
...
@@ -8,9 +8,11 @@ include_directories(
${
DBUS_INCLUDE_DIRS
}
${
SDL2_INCLUDE_DIRS
}
${
LXC_INCLUDE_DIRS
}
${
MIRCLIENT_INCLUDE_DIRS
}
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_SOURCE_DIR
}
${
CMAKE_SOURCE_DIR
}
/src
${
CMAKE_SOURCE_DIR
}
/external
${
CMAKE_SOURCE_DIR
}
/external/process-cpp-minimal/include
${
CMAKE_SOURCE_DIR
}
/external/android-emugl/shared
${
CMAKE_SOURCE_DIR
}
/external/android-emugl/host/include
...
...
@@ -205,6 +207,8 @@ target_link_libraries(anbox-core
${
SDL2_LIBRARIES
}
${
LXC_LDFLAGS
}
${
LXC_LIBRARIES
}
${
MIRCLIENT_LDFLAGS
}
${
MIRCLIENT_LIBRARIES
}
pthread
process-cpp
emugl_common
...
...
src/anbox/ubuntu/window.cpp
浏览文件 @
53b8071e
...
...
@@ -23,6 +23,10 @@
#include <boost/throw_exception.hpp>
#if defined(MIR_SUPPORT)
#include <mir_toolkit/mir_client_library.h>
#endif
#include <SDL_syswm.h>
#pragma GCC diagnostic pop
...
...
@@ -58,10 +62,17 @@ Window::Window(const std::shared_ptr<Renderer> &renderer,
SDL_GetWindowWMInfo
(
window_
,
&
info
);
switch
(
info
.
subsystem
)
{
case
SDL_SYSWM_X11
:
native_display_
=
static_cast
<
EGLNativeDisplayType
>
(
info
.
info
.
x11
.
display
);
native_display_
=
static_cast
<
EGLNativeDisplayType
>
(
info
.
info
.
x11
.
display
);
native_window_
=
static_cast
<
EGLNativeWindowType
>
(
info
.
info
.
x11
.
window
);
break
;
#if defined(MIR_SUPPORT)
case
SDL_SYSWM_MIR
:
{
native_display_
=
static_cast
<
EGLNativeDisplayType
>
(
mir_connection_get_egl_native_display
(
info
.
info
.
mir
.
connection
));
auto
buffer_stream
=
mir_surface_get_buffer_stream
(
info
.
info
.
mir
.
surface
);
native_window_
=
reinterpret_cast
<
EGLNativeWindowType
>
(
mir_buffer_stream_get_egl_native_window
(
buffer_stream
));
break
;
}
#endif
default:
ERROR
(
"Unknown subsystem (%d)"
,
info
.
subsystem
);
BOOST_THROW_EXCEPTION
(
std
::
runtime_error
(
"SDL subsystem not suported"
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录