diff options
author | Brian Osman <brianosman@google.com> | 2017-02-21 16:58:08 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-22 13:32:56 +0000 |
commit | 60c774db3ec46f3eb85f6390ba31e38c8d29e2d4 (patch) | |
tree | 0fd26132415dc9843b98b4db2e90ba1f44b3c32c /tools/gpu/gl/debug | |
parent | 22eb2f1aa09b0fb27c199c2cc96cd74b2098d502 (diff) |
Support shared GL contexts in GrContextFactory
Mostly plumbing, plus some minimal testing to make sure that
the platform APIs don't explode. I plan to add testing of
SkCrossContextImageData using this, which should verify that
textures are actually shared.
Also found a factory and some related code in the
CommandBuffer test context that was totally unused.
BUG=skia:
Change-Id: I05bbc22c4d1ef946b702a5cc7f67788785219c62
Reviewed-on: https://skia-review.googlesource.com/8808
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/gpu/gl/debug')
-rw-r--r-- | tools/gpu/gl/debug/DebugGLTestContext.cpp | 5 | ||||
-rw-r--r-- | tools/gpu/gl/debug/DebugGLTestContext.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp index cf8a9e4240..e8eea8f78e 100644 --- a/tools/gpu/gl/debug/DebugGLTestContext.cpp +++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp @@ -1208,7 +1208,10 @@ private: } // anonymous namespace namespace sk_gpu_test { -GLTestContext* CreateDebugGLTestContext() { +GLTestContext* CreateDebugGLTestContext(GLTestContext* shareContext) { + if (shareContext) { + return nullptr; + } GLTestContext* ctx = new DebugGLContext(); if (ctx->isValid()) { return ctx; diff --git a/tools/gpu/gl/debug/DebugGLTestContext.h b/tools/gpu/gl/debug/DebugGLTestContext.h index 3f2646bb8c..9b9abe5644 100644 --- a/tools/gpu/gl/debug/DebugGLTestContext.h +++ b/tools/gpu/gl/debug/DebugGLTestContext.h @@ -11,7 +11,7 @@ #include "gl/GLTestContext.h" namespace sk_gpu_test { -GLTestContext* CreateDebugGLTestContext(); +GLTestContext* CreateDebugGLTestContext(GLTestContext* shareContext = nullptr); } // namespace sk_gpu_test #endif |