Make GrContextThreadSafeProxy not a GrContext_Base
Once this API is retracted, we can rename it to something more sane.
The code base has some `fContextInfo` ivars of this type, suggesting it
was previously named ContextInfo. It could be a ContextGroup or something else.
Bug: skia:10318
Change-Id: I3471e2172f46163f98a94780f0d7eb3431894cda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 956a2e5..5bff036 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -48,8 +48,7 @@
////////////////////////////////////////////////////////////////////////////////
-GrContext::GrContext(GrBackendApi backend, const GrContextOptions& options, int32_t contextID)
- : INHERITED(backend, options, contextID) {
+GrContext::GrContext(sk_sp<GrContextThreadSafeProxy> proxy) : INHERITED(std::move(proxy)) {
fResourceCache = nullptr;
fResourceProvider = nullptr;
}
@@ -64,15 +63,14 @@
delete fResourceCache;
}
-bool GrContext::init(sk_sp<const GrCaps> caps) {
+bool GrContext::init() {
ASSERT_SINGLE_OWNER
SkASSERT(this->proxyProvider());
- if (!INHERITED::init(std::move(caps))) {
+ if (!INHERITED::init()) {
return false;
}
- SkASSERT(this->caps());
SkASSERT(this->getTextBlobCache());
if (fGpu) {
@@ -104,7 +102,7 @@
}
sk_sp<GrContextThreadSafeProxy> GrContext::threadSafeProxy() {
- return fThreadSafeProxy;
+ return INHERITED::threadSafeProxy();
}
//////////////////////////////////////////////////////////////////////////////