Index: src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
diff --git a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
index 3b2488dfc6ecba364f185d383c3eec4ff70708a4..4ecdec7e9b65555bd40d7e761c8e9b076a578fd7 100644 |
--- a/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
+++ b/src/gpu/gl/egl/SkCreatePlatformGLContext_egl.cpp |
@@ -317,7 +317,8 @@ void SkEGLFenceSync::deleteFence(SkPlatformGpuFence platformFence) const { |
} // anonymous namespace |
-SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI) { |
+SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, SkGLContext* shareContext) { |
+ SkASSERT(!shareContext); |
bsalomon
2016/01/20 15:26:07
Why these asserts rather than just return nullptr?
joshualitt
2016/01/20 15:45:20
I can see it both ways. It make it easier to spot
|
EGLGLContext* ctx = new EGLGLContext(forcedGpuAPI); |
if (!ctx->isValid()) { |
delete ctx; |