Loading include/gui/GraphicsEnv.h→include/ui/GraphicsEnv.h +3 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ * limitations under the License. */ #ifndef ANDROID_GUI_GRAPHICS_ENV_H #define ANDROID_GUI_GRAPHICS_ENV_H 1 #ifndef ANDROID_UI_GRAPHICS_ENV_H #define ANDROID_UI_GRAPHICS_ENV_H 1 #include <string> Loading Loading @@ -56,4 +56,4 @@ private: */ extern "C" android_namespace_t* android_getDriverNamespace(); #endif // ANDROID_GUI_GRAPHICS_ENV_H #endif // ANDROID_UI_GRAPHICS_ENV_H libs/gui/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ cc_library_shared { "FrameTimestamps.cpp", "GLConsumer.cpp", "GraphicBufferAlloc.cpp", "GraphicsEnv.cpp", "GuiConfig.cpp", "IDisplayEventConnection.cpp", "IGraphicBufferAlloc.cpp", Loading @@ -100,7 +99,6 @@ cc_library_shared { ], shared_libs: [ "libnativeloader", "libsync", "libbinder", "libcutils", Loading libs/ui/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ cc_library_shared { "GraphicBuffer.cpp", "GraphicBufferAllocator.cpp", "GraphicBufferMapper.cpp", "GraphicsEnv.cpp", "HdrCapabilities.cpp", "PixelFormat.cpp", "Rect.cpp", Loading @@ -65,6 +66,7 @@ cc_library_shared { shared_libs: [ "android.hardware.graphics.allocator@2.0", "android.hardware.graphics.mapper@2.0", "libnativeloader", "libbinder", "libcutils", "libhardware", Loading libs/gui/GraphicsEnv.cpp→libs/ui/GraphicsEnv.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ //#define LOG_NDEBUG 1 #define LOG_TAG "GraphicsEnv" #include <gui/GraphicsEnv.h> #include <ui/GraphicsEnv.h> #include <mutex> Loading opengl/libs/EGL/Loader.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <cutils/properties.h> #include <log/log.h> #include <utils/Trace.h> #include <ui/GraphicsEnv.h> #include <EGL/egl.h> Loading Loading @@ -147,26 +148,11 @@ status_t Loader::driver_t::set(void* hnd, int32_t api) // ---------------------------------------------------------------------------- Loader::Loader() : getProcAddress(NULL), mLibGui(nullptr), mGetDriverNamespace(nullptr) : getProcAddress(NULL) { // FIXME: See note in GraphicsEnv.h about android_getDriverNamespace(). // libgui should already be loaded in any process that uses libEGL, but // if for some reason it isn't, then we're not going to get a driver // namespace anyway, so don't force it to be loaded. mLibGui = dlopen("libgui.so", RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY); if (!mLibGui) { ALOGD("failed to load libgui: %s", dlerror()); return; } mGetDriverNamespace = reinterpret_cast<decltype(mGetDriverNamespace)>( dlsym(mLibGui, "android_getDriverNamespace")); } Loader::~Loader() { if (mLibGui) dlclose(mLibGui); } static void* load_wrapper(const char* path) { Loading Loading @@ -483,12 +469,10 @@ void *Loader::load_driver(const char* kind, ATRACE_CALL(); void* dso = nullptr; if (mGetDriverNamespace) { android_namespace_t* ns = mGetDriverNamespace(); android_namespace_t* ns = android_getDriverNamespace(); if (ns) { dso = load_updated_driver(kind, ns); } } if (!dso) { dso = load_system_driver(kind); if (!dso) Loading Loading
include/gui/GraphicsEnv.h→include/ui/GraphicsEnv.h +3 −3 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ * limitations under the License. */ #ifndef ANDROID_GUI_GRAPHICS_ENV_H #define ANDROID_GUI_GRAPHICS_ENV_H 1 #ifndef ANDROID_UI_GRAPHICS_ENV_H #define ANDROID_UI_GRAPHICS_ENV_H 1 #include <string> Loading Loading @@ -56,4 +56,4 @@ private: */ extern "C" android_namespace_t* android_getDriverNamespace(); #endif // ANDROID_GUI_GRAPHICS_ENV_H #endif // ANDROID_UI_GRAPHICS_ENV_H
libs/gui/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ cc_library_shared { "FrameTimestamps.cpp", "GLConsumer.cpp", "GraphicBufferAlloc.cpp", "GraphicsEnv.cpp", "GuiConfig.cpp", "IDisplayEventConnection.cpp", "IGraphicBufferAlloc.cpp", Loading @@ -100,7 +99,6 @@ cc_library_shared { ], shared_libs: [ "libnativeloader", "libsync", "libbinder", "libcutils", Loading
libs/ui/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ cc_library_shared { "GraphicBuffer.cpp", "GraphicBufferAllocator.cpp", "GraphicBufferMapper.cpp", "GraphicsEnv.cpp", "HdrCapabilities.cpp", "PixelFormat.cpp", "Rect.cpp", Loading @@ -65,6 +66,7 @@ cc_library_shared { shared_libs: [ "android.hardware.graphics.allocator@2.0", "android.hardware.graphics.mapper@2.0", "libnativeloader", "libbinder", "libcutils", "libhardware", Loading
libs/gui/GraphicsEnv.cpp→libs/ui/GraphicsEnv.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ //#define LOG_NDEBUG 1 #define LOG_TAG "GraphicsEnv" #include <gui/GraphicsEnv.h> #include <ui/GraphicsEnv.h> #include <mutex> Loading
opengl/libs/EGL/Loader.cpp +5 −21 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <cutils/properties.h> #include <log/log.h> #include <utils/Trace.h> #include <ui/GraphicsEnv.h> #include <EGL/egl.h> Loading Loading @@ -147,26 +148,11 @@ status_t Loader::driver_t::set(void* hnd, int32_t api) // ---------------------------------------------------------------------------- Loader::Loader() : getProcAddress(NULL), mLibGui(nullptr), mGetDriverNamespace(nullptr) : getProcAddress(NULL) { // FIXME: See note in GraphicsEnv.h about android_getDriverNamespace(). // libgui should already be loaded in any process that uses libEGL, but // if for some reason it isn't, then we're not going to get a driver // namespace anyway, so don't force it to be loaded. mLibGui = dlopen("libgui.so", RTLD_NOLOAD | RTLD_LOCAL | RTLD_LAZY); if (!mLibGui) { ALOGD("failed to load libgui: %s", dlerror()); return; } mGetDriverNamespace = reinterpret_cast<decltype(mGetDriverNamespace)>( dlsym(mLibGui, "android_getDriverNamespace")); } Loader::~Loader() { if (mLibGui) dlclose(mLibGui); } static void* load_wrapper(const char* path) { Loading Loading @@ -483,12 +469,10 @@ void *Loader::load_driver(const char* kind, ATRACE_CALL(); void* dso = nullptr; if (mGetDriverNamespace) { android_namespace_t* ns = mGetDriverNamespace(); android_namespace_t* ns = android_getDriverNamespace(); if (ns) { dso = load_updated_driver(kind, ns); } } if (!dso) { dso = load_system_driver(kind); if (!dso) Loading