diff --git a/external/xdg/xdg.cpp b/external/xdg/xdg.cpp index de9b043..d54fdfe 100644 --- a/external/xdg/xdg.cpp +++ b/external/xdg/xdg.cpp @@ -57,7 +57,6 @@ constexpr const char* xdg_data_dirs{"XDG_DATA_DIRS"}; constexpr const char* xdg_config_home{"XDG_CONFIG_HOME"}; constexpr const char* xdg_config_dirs{"XDG_CONFIG_DIRS"}; constexpr const char* xdg_cache_home{"XDG_CACHE_HOME"}; -constexpr const char* xdg_runtime_dir{"XDG_RUNTIME_DIR"}; } namespace impl diff --git a/src/anbox/cmds/session_manager.cpp b/src/anbox/cmds/session_manager.cpp index 5a46566..3834502 100644 --- a/src/anbox/cmds/session_manager.cpp +++ b/src/anbox/cmds/session_manager.cpp @@ -27,12 +27,17 @@ #include "anbox/bridge/android_api_stub.h" #include "anbox/bridge/platform_api_skeleton.h" #include "anbox/bridge/platform_message_processor.h" +#include "anbox/graphics/gl_renderer_server.h" + +namespace { +std::istream& operator>>(std::istream& in, anbox::graphics::GLRendererServer::Config::Driver& driver); +} + #include "anbox/cmds/session_manager.h" #include "anbox/common/dispatcher.h" #include "anbox/config.h" #include "anbox/container/client.h" #include "anbox/dbus/skeleton/service.h" -#include "anbox/graphics/gl_renderer_server.h" #include "anbox/input/manager.h" #include "anbox/logger.h" #include "anbox/network/published_socket_connector.h" diff --git a/src/anbox/graphics/emugl/ColorBuffer.cpp b/src/anbox/graphics/emugl/ColorBuffer.cpp index c1efb6e..4c478f3 100644 --- a/src/anbox/graphics/emugl/ColorBuffer.cpp +++ b/src/anbox/graphics/emugl/ColorBuffer.cpp @@ -35,22 +35,6 @@ inline void* SafePointerFromUInt(unsigned int handle) { return reinterpret_cast(static_cast(handle)); } -inline unsigned int SafeUIntFromPointer(const void* ptr) { -#if 1 - // Ignore the assert below to avoid crashing when running older - // system images, which might have buggy encoder libraries. Print - // an error message though. - if (reinterpret_cast(ptr) != static_cast(reinterpret_cast(ptr))) { - WARNING("Bad generic pointer %p", ptr); - } -#else - // Assertion error if the pointer contains a value that does not fit - // in an unsigned integer! - assert((uintptr_t)(ptr) == (unsigned int)(uintptr_t)(ptr)); -#endif - return static_cast(reinterpret_cast(ptr)); -} - // Lazily create and bind a framebuffer object to the current host context. // |fbo| is the address of the framebuffer object name. // |tex| is the name of a texture that is attached to the framebuffer object diff --git a/src/anbox/graphics/emugl/TextureDraw.cpp b/src/anbox/graphics/emugl/TextureDraw.cpp index bb421bd..5015420 100644 --- a/src/anbox/graphics/emugl/TextureDraw.cpp +++ b/src/anbox/graphics/emugl/TextureDraw.cpp @@ -97,16 +97,13 @@ const GLint kIndicesLen = sizeof(kIndices) / sizeof(kIndices[0]); } // namespace -TextureDraw::TextureDraw(EGLDisplay display) - : mDisplay(display), - mVertexShader(0), +TextureDraw::TextureDraw(EGLDisplay) + : mVertexShader(0), mFragmentShader(0), mProgram(0), mPositionSlot(-1), mInCoordSlot(-1), - mTextureSlot(-1), - mRotationSlot(-1), - mTranslationSlot(-1) { + mTextureSlot(-1) { // Create shaders and program. mVertexShader = createShader(GL_VERTEX_SHADER, kVertexShaderSource); mFragmentShader = createShader(GL_FRAGMENT_SHADER, kFragmentShaderSource); diff --git a/src/anbox/graphics/emugl/TextureDraw.h b/src/anbox/graphics/emugl/TextureDraw.h index 5f6ef96..10f796c 100644 --- a/src/anbox/graphics/emugl/TextureDraw.h +++ b/src/anbox/graphics/emugl/TextureDraw.h @@ -42,15 +42,12 @@ class TextureDraw { bool draw(GLuint texture); private: - EGLDisplay mDisplay; GLuint mVertexShader; GLuint mFragmentShader; GLuint mProgram; GLint mPositionSlot; GLint mInCoordSlot; GLint mTextureSlot; - GLint mRotationSlot; - GLint mTranslationSlot; GLuint mVertexBuffer; GLuint mIndexBuffer; }; diff --git a/src/anbox/network/published_socket_connector.cpp b/src/anbox/network/published_socket_connector.cpp index 5e1a9b6..50e8fc5 100644 --- a/src/anbox/network/published_socket_connector.cpp +++ b/src/anbox/network/published_socket_connector.cpp @@ -33,7 +33,7 @@ PublishedSocketConnector::PublishedSocketConnector( start_accept(); } -PublishedSocketConnector::~PublishedSocketConnector() {} +PublishedSocketConnector::~PublishedSocketConnector() noexcept {} void PublishedSocketConnector::start_accept() { auto socket = std::make_shared(runtime_->service()); diff --git a/src/anbox/network/tcp_socket_connector.cpp b/src/anbox/network/tcp_socket_connector.cpp index 00d33c2..63e8325 100644 --- a/src/anbox/network/tcp_socket_connector.cpp +++ b/src/anbox/network/tcp_socket_connector.cpp @@ -34,7 +34,7 @@ TcpSocketConnector::TcpSocketConnector( start_accept(); } -TcpSocketConnector::~TcpSocketConnector() { acceptor_.cancel(); } +TcpSocketConnector::~TcpSocketConnector() noexcept { acceptor_.cancel(); } void TcpSocketConnector::start_accept() { auto socket = diff --git a/src/anbox/qemu/pipe_connection_creator.cpp b/src/anbox/qemu/pipe_connection_creator.cpp index 78bb258..722b227 100644 --- a/src/anbox/qemu/pipe_connection_creator.cpp +++ b/src/anbox/qemu/pipe_connection_creator.cpp @@ -73,7 +73,7 @@ PipeConnectionCreator::PipeConnectionCreator(const std::shared_ptr &re std::make_shared>()) { } -PipeConnectionCreator::~PipeConnectionCreator() { +PipeConnectionCreator::~PipeConnectionCreator() noexcept { connections_->clear(); } diff --git a/src/anbox/rpc/connection_creator.cpp b/src/anbox/rpc/connection_creator.cpp index 0ac1fd9..2f3f864 100644 --- a/src/anbox/rpc/connection_creator.cpp +++ b/src/anbox/rpc/connection_creator.cpp @@ -34,7 +34,7 @@ ConnectionCreator::ConnectionCreator(const std::shared_ptr& rt, std::make_shared>()), message_processor_factory_(factory) {} -ConnectionCreator::~ConnectionCreator() {} +ConnectionCreator::~ConnectionCreator() noexcept {} void ConnectionCreator::create_connection_for( std::shared_ptr const& diff --git a/src/anbox/runtime.cpp b/src/anbox/runtime.cpp index 1be2d1c..cbfefa7 100644 --- a/src/anbox/runtime.cpp +++ b/src/anbox/runtime.cpp @@ -57,7 +57,7 @@ Runtime::Runtime(std::uint32_t pool_size) strand_{service_}, keep_alive_{service_} {} -Runtime::~Runtime() { +Runtime::~Runtime() noexcept(true) { try { stop(); } catch (...) {