external: remove GL translator
OpenGL ES is enough for our purpose and we don't want to maintain a unneeded OpenGL ES to GL translator. All target drivers have proper OpenGL ES support these days so no need to depend on GL anymore.
This commit is contained in:
parent
807005b2fa
commit
1edfa6e3dd
93 changed files with 6 additions and 17956 deletions
|
|
@ -29,10 +29,6 @@
|
|||
#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/system_configuration.h"
|
||||
|
|
@ -75,17 +71,6 @@ class NullConnectionCreator : public anbox::network::ConnectionCreator<
|
|||
socket->close();
|
||||
}
|
||||
};
|
||||
|
||||
std::istream& operator>>(std::istream& in, anbox::graphics::GLRendererServer::Config::Driver& driver) {
|
||||
std::string str(std::istreambuf_iterator<char>(in), {});
|
||||
if (str.empty() || str == "translator")
|
||||
driver = anbox::graphics::GLRendererServer::Config::Driver::Translator;
|
||||
else if (str == "host")
|
||||
driver = anbox::graphics::GLRendererServer::Config::Driver::Host;
|
||||
else
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid GLES driver value provided"));
|
||||
return in;
|
||||
}
|
||||
}
|
||||
|
||||
void anbox::cmds::SessionManager::launch_appmgr_if_needed(const std::shared_ptr<bridge::AndroidApiStub> &android_api_stub) {
|
||||
|
|
@ -103,7 +88,6 @@ void anbox::cmds::SessionManager::launch_appmgr_if_needed(const std::shared_ptr<
|
|||
anbox::cmds::SessionManager::SessionManager()
|
||||
: CommandWithFlagsAndAction{cli::Name{"session-manager"}, cli::Usage{"session-manager"},
|
||||
cli::Description{"Run the the anbox session manager"}},
|
||||
gles_driver_(graphics::GLRendererServer::Config::Driver::Host),
|
||||
window_size_(default_single_window_size) {
|
||||
// Just for the purpose to allow QtMir (or unity8) to find this on our
|
||||
// /proc/*/cmdline
|
||||
|
|
@ -111,9 +95,6 @@ anbox::cmds::SessionManager::SessionManager()
|
|||
flag(cli::make_flag(cli::Name{"desktop_file_hint"},
|
||||
cli::Description{"Desktop file hint for QtMir/Unity8"},
|
||||
desktop_file_hint_));
|
||||
flag(cli::make_flag(cli::Name{"gles-driver"},
|
||||
cli::Description{"Which GLES driver to use. Possible values are 'host' or'translator'"},
|
||||
gles_driver_));
|
||||
flag(cli::make_flag(cli::Name{"single-window"},
|
||||
cli::Description{"Start in single window mode."},
|
||||
single_window_));
|
||||
|
|
@ -190,8 +171,11 @@ anbox::cmds::SessionManager::SessionManager()
|
|||
using_single_window = true;
|
||||
}
|
||||
|
||||
auto gl_server = std::make_shared<graphics::GLRendererServer>(
|
||||
graphics::GLRendererServer::Config{gles_driver_, single_window_}, window_manager);
|
||||
graphics::GLRendererServer::Config renderer_config {
|
||||
graphics::GLRendererServer::Config::Driver::Host,
|
||||
single_window_
|
||||
};
|
||||
auto gl_server = std::make_shared<graphics::GLRendererServer>(renderer_config, window_manager);
|
||||
|
||||
platform->set_window_manager(window_manager);
|
||||
platform->set_renderer(gl_server->renderer());
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ class SessionManager : public cli::CommandWithFlagsAndAction {
|
|||
|
||||
std::shared_ptr<container::Client> container_;
|
||||
std::string desktop_file_hint_;
|
||||
graphics::GLRendererServer::Config::Driver gles_driver_;
|
||||
bool single_window_ = false;
|
||||
graphics::Rect window_size_;
|
||||
bool standalone_ = false;
|
||||
|
|
|
|||
|
|
@ -78,14 +78,6 @@ GLRendererServer::GLRendererServer(const Config &config, const std::shared_ptr<w
|
|||
|
||||
auto gl_libs = emugl::default_gl_libraries(true);
|
||||
|
||||
if (config.driver == Config::Driver::Translator) {
|
||||
DEBUG("Using GLES-to-GL translator for rendering");
|
||||
boost::filesystem::path translator_dir = utils::prefix_dir_from_env(TRANSLATOR_INSTALL_DIR, "SNAP");
|
||||
gl_libs.push_back(emugl::GLLibrary{emugl::GLLibrary::Type::EGL, (translator_dir / "libEGL_translator.so")});
|
||||
gl_libs.push_back(emugl::GLLibrary{emugl::GLLibrary::Type::GLESv1, (translator_dir / "libGLES_CM_translator.so")});
|
||||
gl_libs.push_back(emugl::GLLibrary{emugl::GLLibrary::Type::GLESv2, (translator_dir / "libGLES_V2_translator.so")});
|
||||
}
|
||||
|
||||
emugl_logger_struct log_funcs;
|
||||
log_funcs.coarse = logger_write;
|
||||
log_funcs.fine = logger_write;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class LayerComposer;
|
|||
class GLRendererServer {
|
||||
public:
|
||||
struct Config {
|
||||
enum class Driver { Translator, Host };
|
||||
enum class Driver { Host };
|
||||
Driver driver;
|
||||
bool single_window;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue