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/GrContextThreadSafeProxyPriv.h b/src/gpu/GrContextThreadSafeProxyPriv.h
index 00662b7..c4873bb 100644
--- a/src/gpu/GrContextThreadSafeProxyPriv.h
+++ b/src/gpu/GrContextThreadSafeProxyPriv.h
@@ -9,6 +9,7 @@
#define GrContextThreadSafeProxyPriv_DEFINED
#include "include/gpu/GrContextThreadSafeProxy.h"
+#include "include/private/GrContext_Base.h"
#include "src/gpu/GrCaps.h"
@@ -19,24 +20,24 @@
*/
class GrContextThreadSafeProxyPriv {
public:
- // from GrContext_Base
- uint32_t contextID() const { return fProxy->contextID(); }
+ void init(sk_sp<const GrCaps> caps) const { fProxy->init(std::move(caps)); }
- bool matches(GrContext_Base* candidate) const { return fProxy->matches(candidate); }
+ bool matches(GrContext_Base* candidate) const {
+ return fProxy == candidate->threadSafeProxy().get();
+ }
- const GrContextOptions& options() const { return fProxy->options(); }
+ GrBackend backend() const { return fProxy->fBackend; }
+ const GrContextOptions& options() const { return fProxy->fOptions; }
+ uint32_t contextID() const { return fProxy->fContextID; }
- const GrCaps* caps() const { return fProxy->caps(); }
- sk_sp<const GrCaps> refCaps() const { return fProxy->refCaps(); }
+ const GrCaps* caps() const { return fProxy->fCaps.get(); }
+ sk_sp<const GrCaps> refCaps() const { return fProxy->fCaps; }
void abandonContext() { fProxy->abandonContext(); }
bool abandoned() const { return fProxy->abandoned(); }
// GrContextThreadSafeProxyPriv
- static sk_sp<GrContextThreadSafeProxy> Make(GrBackendApi,
- const GrContextOptions&,
- uint32_t contextID,
- sk_sp<const GrCaps>);
+ static sk_sp<GrContextThreadSafeProxy> Make(GrBackendApi, const GrContextOptions&);
private:
explicit GrContextThreadSafeProxyPriv(GrContextThreadSafeProxy* proxy) : fProxy(proxy) {}