aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp')
-rw-r--r--tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
index af35b7b6bc..49d774315b 100644
--- a/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
+++ b/tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp
@@ -85,7 +85,11 @@ WinGLTestContext::WinGLTestContext(GrGLStandard forcedGpuAPI, WinGLTestContext*
kGLES_GrGLStandard == forcedGpuAPI ?
kGLES_SkWGLContextRequest : kGLPreferCompatibilityProfile_SkWGLContextRequest;
- HGLRC winShareContext = shareContext ? shareContext->fGlRenderContext : nullptr;
+ HGLRC winShareContext = nullptr;
+ if (shareContext) {
+ winShareContext = shareContext->fPbufferContext ? shareContext->fPbufferContext->getGLRC()
+ : shareContext->fGlRenderContext;
+ }
fPbufferContext = SkWGLPbufferContext::Create(fDeviceContext, 0, contextType, winShareContext);
HDC dc;