Set up to use new GrDirectContext factories in Chrome
Here is the Chrome-side CL waiting on this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2297920 Use new GrDirectContext factories instead of deprecated GrContext ones)
Change-Id: Ic607c8f4d3b87b38b5a56a2c44012b7402e074dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302583
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 31cb961..a3327a2 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -48,6 +48,8 @@
class SK_API GrContext : public GrRecordingContext {
public:
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
#ifdef SK_GL
/**
* Creates a GrContext for a backend context. If no GrGLInterface is provided then the result of
@@ -100,6 +102,8 @@
static sk_sp<GrContext> MakeMock(const GrMockOptions*, const GrContextOptions&);
static sk_sp<GrContext> MakeMock(const GrMockOptions*);
+#endif // SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
~GrContext() override;
// TODO: Remove this from public after migrating Chrome.
diff --git a/include/gpu/GrDirectContext.h b/include/gpu/GrDirectContext.h
index 8270dd5..8a0b237 100644
--- a/include/gpu/GrDirectContext.h
+++ b/include/gpu/GrDirectContext.h
@@ -12,7 +12,7 @@
class GrAtlasManager;
-class GrDirectContext : public GrContext {
+class SK_API GrDirectContext : public GrContext {
public:
#ifdef SK_GL
/**