Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.

Removes the concept of a configurable "default" interface and makes the default
always be the "native" interface.

Also removes unused functions: GrGLInterfaceAddTestDebugMarker and
GrGLInterface::NewClone.

Keeps around legacy GrGLCreateNativeInterface() until clients can be weened.

Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb
Reviewed-on: https://skia-review.googlesource.com/83000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index d838ccd..bfb4be0 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -546,42 +546,37 @@
   ]
   public_defines = []
 
-  sources = skia_gpu_sources + skia_sksl_sources +
-            [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ] +
-            skia_gpu_processor_outputs
+  sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs
 
   # These paths need to be absolute to match the ones produced by shared_sources.gni.
-  sources -= get_path_info([
-                             "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
-                             "src/gpu/gl/GrGLDefaultInterface_none.cpp",
-                           ],
+  sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ],
                            "abspath")
   libs = []
   if (is_android) {
-    sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
+    sources += [ "src/gpu/gl/android/GrGLMakeNativeInterface_android.cpp" ]
 
     # this lib is required to link against AHardwareBuffer
     if (defined(ndk_api) && ndk_api >= 26) {
       libs += [ "android" ]
     }
   } else if (skia_use_egl) {
-    sources += [ "src/gpu/gl/egl/GrGLCreateNativeInterface_egl.cpp" ]
+    sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
     libs += [ "EGL" ]
   } else if (is_linux) {
-    sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
+    sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
     libs += [
       "GL",
       "GLU",
     ]
   } else if (is_mac) {
-    sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
+    sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
   } else if (is_ios) {
-    sources += [ "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp" ]
+    sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
   } else if (is_win) {
-    sources += [ "src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" ]
+    sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
     libs += [ "OpenGL32.lib" ]
   } else {
-    sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
+    sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
   }
 
   if (skia_use_vulkan) {