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/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp
index 5f50b10..d03726e 100644
--- a/src/gpu/GrDirectContext.cpp
+++ b/src/gpu/GrDirectContext.cpp
@@ -118,6 +118,8 @@
 
 #ifdef SK_GL
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeGL(sk_sp<const GrGLInterface> glInterface) {
     return GrDirectContext::MakeGL(std::move(glInterface));
 }
@@ -135,6 +137,8 @@
     return GrDirectContext::MakeGL(std::move(glInterface), options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeGL(sk_sp<const GrGLInterface> glInterface) {
     GrContextOptions defaultOptions;
@@ -203,6 +207,8 @@
 #endif
 
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeMock(const GrMockOptions* mockOptions) {
     return GrDirectContext::MakeMock(mockOptions);
 }
@@ -212,6 +218,8 @@
     return GrDirectContext::MakeMock(mockOptions, options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeMock(const GrMockOptions* mockOptions) {
     GrContextOptions defaultOptions;
@@ -232,6 +240,8 @@
 
 #ifdef SK_VULKAN
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeVulkan(const GrVkBackendContext& backendContext) {
     return GrDirectContext::MakeVulkan(backendContext);
 }
@@ -241,6 +251,8 @@
     return GrDirectContext::MakeVulkan(backendContext, options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeVulkan(const GrVkBackendContext& backendContext) {
     GrContextOptions defaultOptions;
@@ -262,6 +274,8 @@
 
 #ifdef SK_METAL
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeMetal(void* device, void* queue) {
     return GrDirectContext::MakeMetal(device, queue);
 }
@@ -270,6 +284,8 @@
     return GrDirectContext::MakeMetal(device, queue, options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeMetal(void* device, void* queue) {
     GrContextOptions defaultOptions;
@@ -291,6 +307,8 @@
 
 #ifdef SK_DIRECT3D
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeDirect3D(const GrD3DBackendContext& backendContext) {
     return GrDirectContext::MakeDirect3D(backendContext);
 }
@@ -300,6 +318,8 @@
     return GrDirectContext::MakeDirect3D(backendContext, options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeDirect3D(const GrD3DBackendContext& backendContext) {
     GrContextOptions defaultOptions;
@@ -321,6 +341,8 @@
 
 #ifdef SK_DAWN
 /*************************************************************************************************/
+#ifndef SK_DISABLE_LEGACY_CONTEXT_FACTORIES
+
 sk_sp<GrContext> GrContext::MakeDawn(const wgpu::Device& device) {
     return GrDirectContext::MakeDawn(device);
 }
@@ -329,6 +351,8 @@
     return GrDirectContext::MakeDawn(device, options);
 }
 
+#endif
+
 /*************************************************************************************************/
 sk_sp<GrDirectContext> GrDirectContext::MakeDawn(const wgpu::Device& device) {
     GrContextOptions defaultOptions;