Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
a453635b
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,发现更多精彩内容 >>
提交
a453635b
编写于
6月 27, 2016
作者:
S
Simon Fels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor actual window creation into ubuntu specific namespace
上级
cbd43fb7
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
177 addition
and
96 deletion
+177
-96
CMakeLists.txt
CMakeLists.txt
+2
-0
src/CMakeLists.txt
src/CMakeLists.txt
+6
-3
src/anbox/cmds/run.cpp
src/anbox/cmds/run.cpp
+4
-1
src/anbox/graphics/gl_renderer_server.cpp
src/anbox/graphics/gl_renderer_server.cpp
+6
-7
src/anbox/graphics/gl_renderer_server.h
src/anbox/graphics/gl_renderer_server.h
+4
-5
src/anbox/graphics/window_creator.cpp
src/anbox/graphics/window_creator.cpp
+30
-0
src/anbox/graphics/window_creator.h
src/anbox/graphics/window_creator.h
+45
-0
src/anbox/ubuntu/mir_display_connection.cpp
src/anbox/ubuntu/mir_display_connection.cpp
+11
-3
src/anbox/ubuntu/mir_display_connection.h
src/anbox/ubuntu/mir_display_connection.h
+4
-6
src/anbox/ubuntu/window.cpp
src/anbox/ubuntu/window.cpp
+22
-16
src/anbox/ubuntu/window.h
src/anbox/ubuntu/window.h
+12
-14
src/anbox/ubuntu/window_creator.cpp
src/anbox/ubuntu/window_creator.cpp
+17
-22
src/anbox/ubuntu/window_creator.h
src/anbox/ubuntu/window_creator.h
+14
-19
未找到文件。
CMakeLists.txt
浏览文件 @
a453635b
...
...
@@ -61,6 +61,8 @@ find_package(Threads)
find_package
(
EGL REQUIRED
)
find_package
(
GLESv2 REQUIRED
)
# TODO(morphis): make mir an optional requirement so we can also add support
# for X11, wayland, ... at a later point if needed.
pkg_check_modules
(
MIRCLIENT REQUIRED mirclient
)
#####################################################################
...
...
src/CMakeLists.txt
浏览文件 @
a453635b
...
...
@@ -43,10 +43,8 @@ set(SOURCES
anbox/network/delegate_connection_creator.h
anbox/graphics/opengles_message_processor.cpp
anbox/graphics/mir_display_connection.cpp
anbox/graphics/mir_window.cpp
anbox/graphics/mir_native_window_creator.cpp
anbox/graphics/gl_renderer_server.cpp
anbox/graphics/window_creator.cpp
anbox/input/manager.cpp
anbox/input/device.cpp
...
...
@@ -59,6 +57,11 @@ set(SOURCES
anbox/support/camera_message_processor.cpp
anbox/support/fingerprint_message_processor.cpp
anbox/ubuntu/platform_server.cpp
anbox/ubuntu/mir_display_connection.cpp
anbox/ubuntu/window_creator.cpp
anbox/ubuntu/window.cpp
anbox/cmds/version.cpp
anbox/cmds/run.cpp
anbox/cmds/shell.cpp
...
...
src/anbox/cmds/run.cpp
浏览文件 @
a453635b
...
...
@@ -29,6 +29,8 @@
#include "anbox/network/qemu_pipe_connection_creator.h"
#include "anbox/graphics/gl_renderer_server.h"
#include "anbox/input/manager.h"
#include "anbox/ubuntu/platform_server.h"
#include "anbox/ubuntu/window_creator.h"
#include <sys/prctl.h>
...
...
@@ -69,7 +71,8 @@ anbox::cmds::Run::Run()
auto
input_manager
=
std
::
make_shared
<
input
::
Manager
>
(
rt
);
auto
renderer
=
std
::
make_shared
<
graphics
::
GLRendererServer
>
(
input_manager
);
auto
window_creator
=
std
::
make_shared
<
ubuntu
::
WindowCreator
>
(
input_manager
);
auto
renderer
=
std
::
make_shared
<
graphics
::
GLRendererServer
>
(
window_creator
);
renderer
->
start
();
// Socket which will be used by the qemud service inside the Android
...
...
src/anbox/graphics/gl_renderer_server.cpp
浏览文件 @
a453635b
...
...
@@ -17,8 +17,7 @@
#include "anbox/logger.h"
#include "anbox/graphics/gl_renderer_server.h"
#include "anbox/graphics/mir_native_window_creator.h"
#include "anbox/graphics/mir_display_connection.h"
#include "anbox/graphics/window_creator.h"
#include "OpenglRender/render_api.h"
...
...
@@ -28,8 +27,8 @@
namespace
anbox
{
namespace
graphics
{
GLRendererServer
::
GLRendererServer
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manage
r
)
:
window_creator_
(
std
::
make_shared
<
MirNativeWindowCreator
>
(
input_manager
)
)
{
GLRendererServer
::
GLRendererServer
(
const
std
::
shared_ptr
<
WindowCreator
>
&
window_creato
r
)
:
window_creator_
(
window_creator
)
{
// Force the host EGL/GLES libraries as translator implementation
::
setenv
(
"ANDROID_EGL_LIB"
,
"libEGL.so.1"
,
1
);
...
...
@@ -65,9 +64,9 @@ void GLRendererServer::start() {
log_funcs
.
coarse
=
logger_write
;
log_funcs
.
fine
=
logger_write
;
auto
display
=
window_creator_
->
display
();
const
auto
width
=
display
->
horizontal_resolution
()
;
const
auto
height
=
display
->
vertical_resolution
()
;
auto
display
_info
=
window_creator_
->
display_info
();
const
auto
width
=
display
_info
.
horizontal_resolution
;
const
auto
height
=
display
_info
.
vertical_resolution
;
char
server_addr
[
256
]
=
{
0
};
if
(
!
initOpenGLRenderer
(
width
,
height
,
true
,
server_addr
,
sizeof
(
server_addr
),
log_funcs
,
logger_write
))
...
...
src/anbox/graphics/gl_renderer_server.h
浏览文件 @
a453635b
...
...
@@ -24,13 +24,12 @@
namespace
anbox
{
namespace
input
{
class
Manager
;
}
}
// namespace input
namespace
graphics
{
class
MirNativeWindowCreator
;
class
WindowCreator
;
class
GLRendererServer
{
public:
GLRendererServer
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manage
r
);
GLRendererServer
(
const
std
::
shared_ptr
<
WindowCreator
>
&
window_creato
r
);
~
GLRendererServer
();
void
start
();
...
...
@@ -39,7 +38,7 @@ public:
private:
std
::
string
socket_path_
;
std
::
shared_ptr
<
MirNative
WindowCreator
>
window_creator_
;
std
::
shared_ptr
<
WindowCreator
>
window_creator_
;
};
}
// namespace graphics
...
...
src/anbox/graphics/window_creator.cpp
0 → 100644
浏览文件 @
a453635b
/*
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranties of
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "anbox/graphics/window_creator.h"
namespace
anbox
{
namespace
graphics
{
WindowCreator
::
WindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
)
:
input_manager_
(
input_manager
)
{
}
WindowCreator
::~
WindowCreator
()
{
}
}
// namespace graphics
}
// namespace anbox
src/anbox/graphics/window_creator.h
0 → 100644
浏览文件 @
a453635b
/*
* Copyright (C) 2016 Simon Fels <morphis@gravedo.de>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranties of
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ANBOX_GRAPHICS_WINDOW_CREATOR_H_
#define ANBOX_GRAPHICS_WINDOW_CREATOR_H_
#include "external/android-emugl/host/libs/libOpenglRender/NativeSubWindow.h"
namespace
anbox
{
namespace
input
{
class
Manager
;
}
// namespace input
namespace
graphics
{
class
WindowCreator
:
public
SubWindowHandler
{
public:
WindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
);
virtual
~
WindowCreator
();
struct
DisplayInfo
{
int
horizontal_resolution
;
int
vertical_resolution
;
};
virtual
DisplayInfo
display_info
()
const
=
0
;
protected:
std
::
shared_ptr
<
input
::
Manager
>
input_manager_
;
};
}
// namespace graphics
}
// namespace anbox
#endif
src/anbox/
graphics
/mir_display_connection.cpp
→
src/anbox/
ubuntu
/mir_display_connection.cpp
浏览文件 @
a453635b
...
...
@@ -14,7 +14,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "anbox/
graphics
/mir_display_connection.h"
#include "anbox/
ubuntu
/mir_display_connection.h"
#include "anbox/logger.h"
#include <boost/throw_exception.hpp>
...
...
@@ -48,7 +48,7 @@ static const MirDisplayOutput *find_active_output(
}
namespace
anbox
{
namespace
graphics
{
namespace
ubuntu
{
MirDisplayConnection
::
MirDisplayConnection
()
:
connection_
(
nullptr
),
output_id_
(
-
1
),
...
...
@@ -70,6 +70,13 @@ MirDisplayConnection::MirDisplayConnection() :
BOOST_THROW_EXCEPTION
(
std
::
runtime_error
(
msg
.
c_str
()));
}
mir_connection_set_display_config_change_callback
(
connection_
,
[](
MirConnection
*
connection
,
void
*
context
)
{
auto
thiz
=
reinterpret_cast
<
MirDisplayConnection
*>
(
context
);
DEBUG
(
""
);
},
this
);
MirDisplayConfiguration
*
display_config
=
mir_connection_create_display_config
(
connection_
);
...
...
@@ -82,6 +89,7 @@ MirDisplayConnection::MirDisplayConnection() :
output_id_
=
output
->
output_id
;
const
MirDisplayMode
*
mode
=
&
output
->
modes
[
output
->
current_mode
];
vertical_resolution_
=
mode
->
vertical_resolution
;
horizontal_resolution_
=
mode
->
horizontal_resolution
;
...
...
@@ -118,5 +126,5 @@ int MirDisplayConnection::vertical_resolution() const {
int
MirDisplayConnection
::
horizontal_resolution
()
const
{
return
horizontal_resolution_
;
}
}
// namespace
graphics
}
// namespace
ubuntu
}
// namespace anbox
src/anbox/
graphics
/mir_display_connection.h
→
src/anbox/
ubuntu
/mir_display_connection.h
浏览文件 @
a453635b
...
...
@@ -15,8 +15,8 @@
*
*/
#ifndef ANBOX_
GRAPHICS
_MIR_DISPLAY_CONNECTION_H_
#define ANBOX_
GRAPHICS
_MIR_DISPLAY_CONNECTION_H_
#ifndef ANBOX_
UBUNTU
_MIR_DISPLAY_CONNECTION_H_
#define ANBOX_
UBUNTU
_MIR_DISPLAY_CONNECTION_H_
#define MIR_EGL_PLATFORM
...
...
@@ -25,8 +25,7 @@
#include <EGL/egl.h>
namespace
anbox
{
namespace
graphics
{
namespace
ubuntu
{
class
MirDisplayConnection
{
public:
MirDisplayConnection
();
...
...
@@ -47,8 +46,7 @@ private:
int
vertical_resolution_
;
int
horizontal_resolution_
;
};
}
// namespace graphics
}
// namespace ubuntu
}
// namespace anbox
#endif
src/anbox/
graphics/mir_
window.cpp
→
src/anbox/
ubuntu/
window.cpp
浏览文件 @
a453635b
...
...
@@ -15,11 +15,13 @@
*
*/
#include "anbox/graphics/mir_window.h"
#include "anbox/graphics/mir_display_connection.h"
#include "anbox/logger.h"
#include "anbox/ubuntu/window.h"
#include "anbox/ubuntu/mir_display_connection.h"
#include "anbox/input/manager.h"
#include "anbox/input/device.h"
#include "anbox/logger.h"
#include <boost/throw_exception.hpp>
namespace
{
class
SlotFingerMapper
{
...
...
@@ -64,9 +66,12 @@ private:
};
}
namespace
anbox
{
namespace
graphics
{
MirWindow
::
MirWindow
(
const
std
::
shared_ptr
<
MirDisplayConnection
>
&
display
,
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
)
:
namespace
ubuntu
{
Window
::
Window
(
const
std
::
shared_ptr
<
MirDisplayConnection
>
&
display
,
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
,
int
width
,
int
height
)
:
native_window_
(
0
),
surface_
(
nullptr
)
{
...
...
@@ -76,14 +81,15 @@ MirWindow::MirWindow(const std::shared_ptr<MirDisplayConnection> &display, const
auto
spec
=
mir_connection_create_spec_for_normal_surface
(
display
->
connection
(),
display
->
vertical_resolution
()
,
display
->
horizontal_resolution
()
,
width
,
height
,
pixel_format
);
mir_surface_spec_set_name
(
spec
,
"anbox"
);
mir_surface_spec_set_event_handler
(
spec
,
handle_surface_event
,
this
);
mir_surface_spec_set_fullscreen_on_output
(
spec
,
display
->
output_id
());
mir_surface_spec_set_buffer_usage
(
spec
,
mir_buffer_usage_hardware
);
mir_surface_spec_set_shell_chrome
(
spec
,
mir_shell_chrome_normal
);
surface_
=
mir_surface_create_sync
(
spec
);
mir_surface_spec_release
(
spec
);
...
...
@@ -116,19 +122,19 @@ MirWindow::MirWindow(const std::shared_ptr<MirDisplayConnection> &display, const
input_device_
->
set_abs_bit
(
ABS_MT_POSITION_Y
);
input_device_
->
set_prop_bit
(
INPUT_PROP_DIRECT
);
input_device_
->
set_abs_min
(
ABS_MT_POSITION_X
,
0
);
input_device_
->
set_abs_max
(
ABS_MT_POSITION_X
,
display
->
horizontal_resolution
()
);
input_device_
->
set_abs_max
(
ABS_MT_POSITION_X
,
parameters
.
width
);
input_device_
->
set_abs_min
(
ABS_MT_POSITION_Y
,
0
);
input_device_
->
set_abs_max
(
ABS_MT_POSITION_Y
,
display
->
vertical_resolution
()
);
input_device_
->
set_abs_max
(
ABS_MT_POSITION_Y
,
parameters
.
height
);
input_device_
->
set_abs_max
(
ABS_MT_SLOT
,
10
);
input_device_
->
set_abs_max
(
ABS_MT_TRACKING_ID
,
255
);
input_device_
->
set_key_bit
(
BTN_TOUCH
);
input_device_
->
set_key_bit
(
BTN_TOOL_FINGER
);
}
MirWindow
::~
Mir
Window
()
{
Window
::~
Window
()
{
}
void
Mir
Window
::
handle_touch_event
(
MirTouchEvent
const
*
touch_event
)
{
void
Window
::
handle_touch_event
(
MirTouchEvent
const
*
touch_event
)
{
const
auto
point_count
=
mir_touch_event_point_count
(
touch_event
);
static
SlotFingerMapper
mapper
;
...
...
@@ -178,7 +184,7 @@ void MirWindow::handle_touch_event(MirTouchEvent const* touch_event) {
}
}
void
Mir
Window
::
handle_input_event
(
MirInputEvent
const
*
input_event
)
{
void
Window
::
handle_input_event
(
MirInputEvent
const
*
input_event
)
{
const
auto
type
=
mir_input_event_get_type
(
input_event
);
MirTouchEvent
const
*
touch_event
=
nullptr
;
MirKeyboardEvent
const
*
key_event
=
nullptr
;
...
...
@@ -196,9 +202,9 @@ void MirWindow::handle_input_event(MirInputEvent const* input_event) {
}
}
void
MirWindow
::
handle_surface_event
(
MirSurface
*
surface
,
MirEvent
const
*
event
,
void
*
context
)
{
void
Window
::
handle_surface_event
(
MirSurface
*
,
MirEvent
const
*
event
,
void
*
context
)
{
const
auto
event_type
=
mir_event_get_type
(
event
);
auto
thiz
=
static_cast
<
Mir
Window
*>
(
context
);
auto
thiz
=
static_cast
<
Window
*>
(
context
);
switch
(
event_type
)
{
case
mir_event_type_input
:
...
...
@@ -209,8 +215,8 @@ void MirWindow::handle_surface_event(MirSurface *surface, MirEvent const* event,
}
}
EGLNativeWindowType
Mir
Window
::
native_window
()
const
{
EGLNativeWindowType
Window
::
native_window
()
const
{
return
native_window_
;
}
}
// namespace
graphics
}
// namespace
bridge
}
// namespace anbox
src/anbox/
graphics/mir_
window.h
→
src/anbox/
ubuntu/
window.h
浏览文件 @
a453635b
...
...
@@ -15,29 +15,28 @@
*
*/
#ifndef ANBOX_GRAPHICS_MIR_WINDOW_H_
#define ANBOX_GRAPHICS_MIR_WINDOW_H_
#define MIR_EGL_PLATFORM
#include <mirclient/mir_toolkit/mir_client_library.h>
#ifndef ANBOX_UBUNTU_WINDOW_H_
#define ANBOX_UBUNTU_WINDOW_H_
#include <EGL/egl.h>
#include <memory>
#include <mirclient/mir_toolkit/mir_client_library.h>
namespace
anbox
{
namespace
input
{
class
Manager
;
class
Device
;
}
namespace
graphics
{
}
// namespace input
namespace
ubuntu
{
class
MirDisplayConnection
;
class
MirWindow
{
class
Window
{
public:
MirWindow
(
const
std
::
shared_ptr
<
MirDisplayConnection
>
&
display
,
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
);
~
MirWindow
();
Window
(
const
std
::
shared_ptr
<
MirDisplayConnection
>
&
display
,
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
,
int
width
,
int
height
);
~
Window
();
EGLNativeWindowType
native_window
()
const
;
...
...
@@ -51,8 +50,7 @@ private:
EGLNativeWindowType
native_window_
;
MirSurface
*
surface_
;
};
}
// namespace graphics
}
// namespace bridge
}
// namespace anbox
#endif
src/anbox/
graphics/mir_native_
window_creator.cpp
→
src/anbox/
ubuntu/
window_creator.cpp
浏览文件 @
a453635b
...
...
@@ -15,39 +15,35 @@
*
*/
#include "anbox/
graphics/mir_native_
window_creator.h"
#include "anbox/
graphics/mir_display_connection
.h"
#include "anbox/
graphics/mir_window
.h"
#include "anbox/
input/mana
ger.h"
#include "anbox/
ubuntu/
window_creator.h"
#include "anbox/
ubuntu/window
.h"
#include "anbox/
ubuntu/mir_display_connection
.h"
#include "anbox/
log
ger.h"
#include <boost/throw_exception.hpp>
namespace
anbox
{
namespace
graphics
{
MirNativeWindowCreator
::
MirNativeWindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
)
:
namespace
ubuntu
{
WindowCreator
::
WindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
)
:
graphics
::
WindowCreator
(
input_manager
),
input_manager_
(
input_manager
),
display_
connection_
(
std
::
make_shared
<
MirDisplayConnection
>
())
{
display_
(
std
::
make_shared
<
MirDisplayConnection
>
())
{
}
MirNativeWindowCreator
::~
MirNative
WindowCreator
()
{
WindowCreator
::~
WindowCreator
()
{
}
EGLNativeWindowType
MirNativeWindowCreator
::
create_window
(
int
x
,
int
y
,
int
width
,
int
height
)
{
(
void
)
x
;
(
void
)
y
;
(
void
)
width
;
(
void
)
height
;
EGLNativeWindowType
WindowCreator
::
create_window
(
int
x
,
int
y
,
int
width
,
int
height
)
{
DEBUG
(
"x %i y %i width %i height %i"
,
x
,
y
,
width
,
height
);
if
(
windows_
.
size
()
>
0
)
BOOST_THROW_EXCEPTION
(
std
::
runtime_error
(
"We currently only allow a single native window"
));
auto
window
=
std
::
make_shared
<
MirWindow
>
(
display_connection_
,
input_manager_
);
auto
window
=
std
::
make_shared
<
Window
>
(
display_
,
input_manager_
,
width
,
height
);
windows_
.
insert
({
window
->
native_window
(),
window
});
return
window
->
native_window
();
}
void
MirNative
WindowCreator
::
destroy_window
(
EGLNativeWindowType
win
)
{
void
WindowCreator
::
destroy_window
(
EGLNativeWindowType
win
)
{
auto
iter
=
windows_
.
find
(
win
);
if
(
iter
==
windows_
.
end
())
return
;
...
...
@@ -55,9 +51,8 @@ void MirNativeWindowCreator::destroy_window(EGLNativeWindowType win) {
windows_
.
erase
(
iter
);
}
std
::
shared_ptr
<
MirDisplayConnection
>
MirNativeWindowCreator
::
display
()
const
{
return
display_connection_
;
WindowCreator
::
DisplayInfo
WindowCreator
::
display_info
()
const
{
return
{
display_
->
horizontal_resolution
(),
display_
->
vertical_resolution
()}
;
}
}
// namespace graphics
}
// namespace bridge
}
// namespace anbox
src/anbox/
graphics/mir_native_
window_creator.h
→
src/anbox/
ubuntu/
window_creator.h
浏览文件 @
a453635b
...
...
@@ -15,40 +15,35 @@
*
*/
#ifndef ANBOX_
GRAPHICS_MIR_NATIVE
_WINDOW_CREATOR_H_
#define ANBOX_
GRAPHICS_MIR_NATIVE
_WINDOW_CREATOR_H_
#ifndef ANBOX_
UBUNTU
_WINDOW_CREATOR_H_
#define ANBOX_
UBUNTU
_WINDOW_CREATOR_H_
#include "
external/android-emugl/host/libs/libOpenglRender/NativeSubWindow
.h"
#include "
anbox/graphics/window_creator
.h"
#include <memory>
#include <map>
namespace
anbox
{
namespace
input
{
class
Manager
;
}
namespace
graphics
{
#include <EGL/egl.h>
namespace
anbox
{
namespace
ubuntu
{
class
MirDisplayConnection
;
class
MirWindow
;
class
MirNativeWindowCreator
:
public
SubWindowHandler
{
class
Window
;
class
WindowCreator
:
public
graphics
::
WindowCreator
{
public:
MirNativeWindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_channel
);
virtual
~
MirNative
WindowCreator
();
WindowCreator
(
const
std
::
shared_ptr
<
input
::
Manager
>
&
input_manager
);
~
WindowCreator
();
EGLNativeWindowType
create_window
(
int
x
,
int
y
,
int
width
,
int
height
)
override
;
void
destroy_window
(
EGLNativeWindowType
win
)
override
;
std
::
shared_ptr
<
MirDisplayConnection
>
display
()
const
;
DisplayInfo
display_info
()
const
override
;
private:
std
::
shared_ptr
<
input
::
Manager
>
input_manager_
;
std
::
shared_ptr
<
MirDisplayConnection
>
display_
connection_
;
std
::
map
<
EGLNativeWindowType
,
std
::
shared_ptr
<
Mir
Window
>>
windows_
;
std
::
shared_ptr
<
MirDisplayConnection
>
display_
;
std
::
map
<
EGLNativeWindowType
,
std
::
shared_ptr
<
Window
>>
windows_
;
};
}
// namespace graphics
}
// namespace bridge
}
// namespace anbox
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录