diff options
Diffstat (limited to 'tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp')
-rw-r--r-- | tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp index a6b2637c4b..066784df69 100644 --- a/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp +++ b/tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp @@ -107,6 +107,11 @@ GLXGLTestContext::GLXGLTestContext(GrGLStandard forcedGpuAPI, GLXGLTestContext* , fDisplay(nullptr) , fPixmap(0) , fGlxPixmap(0) { + // We cross our fingers that this is the first X call in the program and that if the application + // is actually threaded that this succeeds. + static SkOnce gOnce; + gOnce([] { XInitThreads(); }); + fDisplay = get_display(); GLXContext glxShareContext = shareContext ? shareContext->fContext : nullptr; |