aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-08-10 12:26:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-10 12:26:00 -0700
commit80e38ac117371129df2eb27fe674c7ca84256971 (patch)
tree5126aeb5f8a8fe73a366dd782c942f2ace8b290d /tools
parent1d65fe293241cfeb405b1724371d6c532bcee55f (diff)
Add more error printing to know why command buffer lib failed to load.
Diffstat (limited to 'tools')
-rw-r--r--tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp b/tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp
index 1870be3936..64d828f696 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);
}
}
}