Remove angle::Library and its usages

No longer needed after https://chromium-review.googlesource.com/513519
Loading libGLESv2 interferes with API tracing tools

BUG=angleproject:1892,angleproject:2343

Change-Id: I2ccbc99377d75d107fd644301402c52466dded21
Reviewed-on: https://chromium-review.googlesource.com/910094
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Yuly Novikov 2018-02-08 18:17:43 -05:00 коммит произвёл Commit Bot
Родитель 41b072b646
Коммит 6108b766b3
6 изменённых файлов: 0 добавлений и 105 удалений

Просмотреть файл

@ -929,8 +929,6 @@ bool ANGLETestBase::InitTestWindow()
mOSWindow->setVisible(true);
mGLESLibrary.reset(angle::loadLibrary("libGLESv2"));
return true;
}
@ -944,8 +942,6 @@ bool ANGLETestBase::DestroyTestWindow()
mOSWindow = nullptr;
}
mGLESLibrary.reset(nullptr);
return true;
}
@ -1129,7 +1125,6 @@ ANGLETestBase::ScopedIgnorePlatformMessages::~ScopedIgnorePlatformMessages()
OSWindow *ANGLETestBase::mOSWindow = nullptr;
Optional<EGLint> ANGLETestBase::mLastRendererType;
std::unique_ptr<angle::Library> ANGLETestBase::mGLESLibrary;
void ANGLETestEnvironment::SetUp()
{

Просмотреть файл

@ -391,9 +391,6 @@ class ANGLETestBase
// Workaround for NVIDIA not being able to share a window with OpenGL and Vulkan.
static Optional<EGLint> mLastRendererType;
// For loading and freeing platform
static std::unique_ptr<angle::Library> mGLESLibrary;
};
class ANGLETest : public ANGLETestBase, public ::testing::TestWithParam<angle::PlatformParameters>

Просмотреть файл

@ -47,45 +47,4 @@ void WriteDebugMessage(const char *format, ...)
// TODO(jmadill): Implement this
}
class PosixLibrary : public Library
{
public:
PosixLibrary(const std::string &libraryName);
~PosixLibrary() override;
void *getSymbol(const std::string &symbolName) override;
private:
void *mModule;
};
PosixLibrary::PosixLibrary(const std::string &libraryName) : mModule(nullptr)
{
const auto &fullName = libraryName + "." + GetSharedLibraryExtension();
mModule = dlopen(fullName.c_str(), RTLD_NOW);
}
PosixLibrary::~PosixLibrary()
{
if (mModule)
{
dlclose(mModule);
}
}
void *PosixLibrary::getSymbol(const std::string &symbolName)
{
if (!mModule)
{
return nullptr;
}
return dlsym(mModule, symbolName.c_str());
}
Library *loadLibrary(const std::string &libraryName)
{
return new PosixLibrary(libraryName);
}
} // namespace angle

Просмотреть файл

@ -27,15 +27,6 @@ ANGLE_EXPORT void SetLowPriorityProcess();
// Write a debug message, either to a standard output or Debug window.
ANGLE_EXPORT void WriteDebugMessage(const char *format, ...);
class ANGLE_EXPORT Library : angle::NonCopyable
{
public:
virtual ~Library() {}
virtual void *getSymbol(const std::string &symbolName) = 0;
};
ANGLE_EXPORT Library *loadLibrary(const std::string &libraryName);
} // namespace angle
#endif // UTIL_SYSTEM_UTILS_H_

Просмотреть файл

@ -19,45 +19,4 @@ void SetLowPriorityProcess()
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
}
class Win32Library : public Library
{
public:
Win32Library(const std::string &libraryName);
~Win32Library() override;
void *getSymbol(const std::string &symbolName) override;
private:
HMODULE mModule;
};
Win32Library::Win32Library(const std::string &libraryName) : mModule(nullptr)
{
const auto &fullName = libraryName + "." + GetSharedLibraryExtension();
mModule = LoadLibraryA(fullName.c_str());
}
Win32Library::~Win32Library()
{
if (mModule)
{
FreeLibrary(mModule);
}
}
void *Win32Library::getSymbol(const std::string &symbolName)
{
if (!mModule)
{
return nullptr;
}
return GetProcAddress(mModule, symbolName.c_str());
}
Library *loadLibrary(const std::string &libraryName)
{
return new Win32Library(libraryName);
}
} // namespace angle

Просмотреть файл

@ -19,10 +19,4 @@ void SetLowPriorityProcess()
// No equivalent to this in WinRT
}
Library *loadLibrary(const std::string &libraryName)
{
// WinRT cannot load code dynamically.
return nullptr;
}
} // namespace angle