diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-08 16:03:17 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-08 20:29:44 +0000 |
commit | cdabbcc3b57f7c7e3ef1c28538c9e91b7a1eaa33 (patch) | |
tree | a3775adc12bca9a8cd8d3b7186d58afefd5bec93 /tools/gpu/GrContextFactory.cpp | |
parent | ba81af27cff1c1e23051d2957612b2f3e0fbf885 (diff) |
Store context type (rather than backend type) in ContextInfo
Change-Id: I7dbfb735f1f094fa0a025b84f69e06a3533f2815
Reviewed-on: https://skia-review.googlesource.com/19101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu/GrContextFactory.cpp')
-rw-r--r-- | tools/gpu/GrContextFactory.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 0238898d71..23ffad155f 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -95,6 +95,10 @@ void GrContextFactory::releaseResourcesAndAbandonContexts() { } } +GrContext* GrContextFactory::get(ContextType type, ContextOverrides overrides) { + return this->getContextInfo(type, overrides).grContext(); +} + ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOverrides overrides, GrContext* shareContext, uint32_t shareIndex) { // (shareIndex != 0) -> (shareContext != nullptr) @@ -108,7 +112,7 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv context.fShareIndex == shareIndex && !context.fAbandoned) { context.fTestContext->makeCurrent(); - return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); + return ContextInfo(context.fType, context.fTestContext, context.fGrContext); } } @@ -263,7 +267,7 @@ ContextInfo GrContextFactory::getContextInfoInternal(ContextType type, ContextOv context.fAbandoned = false; context.fShareContext = shareContext; context.fShareIndex = shareIndex; - return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); + return ContextInfo(context.fType, context.fTestContext, context.fGrContext); } ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOverrides overrides) { |