Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp

Issue 2233073002: Add more error printing to know why command buffer lib failed to load. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkOSLibrary_posix.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
diff --git a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
index 1870be3936db42afe9c4b0ee77b7ad74f1ad2d7d..64d828f69613fd88b9ce39790ef1286f52cc9d5a 100644
--- a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
+++ b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
@@ -88,13 +88,15 @@ static bool gfFunctionsLoadedSuccessfully = false;
namespace {
static void load_command_buffer_functions() {
if (!gLibrary) {
+ static constexpr const char* libName =
#if defined _WIN32
- gLibrary = DynamicLoadLibrary("command_buffer_gles2.dll");
+ "command_buffer_gles2.dll";
#elif defined SK_BUILD_FOR_MAC
- gLibrary = DynamicLoadLibrary("libcommand_buffer_gles2.dylib");
+ "libcommand_buffer_gles2.dylib";
#else
- gLibrary = DynamicLoadLibrary("libcommand_buffer_gles2.so");
+ "libcommand_buffer_gles2.so";
#endif // defined _WIN32
+ gLibrary = DynamicLoadLibrary(libName);
if (gLibrary) {
gfGetDisplay = (GetDisplayProc)GetProcedureAddress(gLibrary, "eglGetDisplay");
gfInitialize = (InitializeProc)GetProcedureAddress(gLibrary, "eglInitialize");
@@ -116,6 +118,8 @@ static void load_command_buffer_functions() {
gfCreateContext && gfDestroyContext && gfMakeCurrent &&
gfSwapBuffers && gfGetProcAddress;
+ } else {
+ SkDebugf("Could not load %s.\n", libName);
}
}
}
« no previous file with comments | « src/ports/SkOSLibrary_posix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698