Hand EGL native display into renderer to not use default display
This commit is contained in:
parent
6c15fb9883
commit
5ee8c02b8d
11 changed files with 25 additions and 10 deletions
|
|
@ -72,7 +72,7 @@ void GLRendererServer::start() {
|
|||
// The width & height we supply here are the dimensions the internal framebuffer
|
||||
// will use. Making this static prevents us for now to resize the window we create
|
||||
// later for the actual display.
|
||||
if (!initOpenGLRenderer(width, height, true, server_addr, sizeof(server_addr), log_funcs, logger_write))
|
||||
if (!initOpenGLRenderer(window_creator_->native_display(), width, height, true, server_addr, sizeof(server_addr), log_funcs, logger_write))
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Failed to setup OpenGL renderer"));
|
||||
|
||||
socket_path_ = server_addr;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public:
|
|||
};
|
||||
|
||||
virtual DisplayInfo display_info() const = 0;
|
||||
virtual EGLNativeDisplayType native_display() const = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<input::Manager> input_manager_;
|
||||
|
|
|
|||
|
|
@ -54,5 +54,9 @@ void WindowCreator::destroy_window(EGLNativeWindowType win) {
|
|||
WindowCreator::DisplayInfo WindowCreator::display_info() const {
|
||||
return {display_->horizontal_resolution(), display_->vertical_resolution()};
|
||||
}
|
||||
|
||||
EGLNativeDisplayType WindowCreator::native_display() const {
|
||||
return display_->native_display();
|
||||
}
|
||||
} // namespace bridge
|
||||
} // namespace anbox
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ public:
|
|||
void destroy_window(EGLNativeWindowType win) override;
|
||||
|
||||
DisplayInfo display_info() const override;
|
||||
EGLNativeDisplayType native_display() const override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<input::Manager> input_manager_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue