Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"

This reverts commit f6784a8c8439ebde2086f801ac76ce5a960d4fe9.

Reason for revert: breakage of builds

Original change's description:
> Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
> 
> Misc fixes to omit GL-dependent targets and fix assumptions that
> SK_SUPPORT_GPU implies SK_GL.
> 
> Bug: skia:10051
> Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com

Change-Id: I4e02f675fd8820ed3c8efee192c64e570a23c3e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index afe71fd..28edea5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -74,7 +74,7 @@
   }
   libs = []
   lib_dirs = []
-  if (skia_use_gl && skia_use_angle) {
+  if (skia_use_angle) {
     defines += [ "SK_ANGLE" ]
   }
 }
@@ -531,37 +531,36 @@
   }
 
   libs = []
+  if (is_android) {
+    sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.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/GrGLMakeNativeInterface_egl.cpp" ]
+    libs += [ "EGL" ]
+  } else if (is_linux && skia_use_x11) {
+    sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
+    libs += [ "GL" ]
+  } else if (is_mac) {
+    sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
+  } else if (is_ios) {
+    sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
+  } else if (is_win) {
+    sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
+    if (target_cpu != "arm64") {
+      libs += [ "OpenGL32.lib" ]
+    }
+  } else {
+    sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
+  }
 
   if (skia_use_gl) {
     public_defines += [ "SK_GL" ]
-    if (is_android) {
-      sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.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/GrGLMakeNativeInterface_egl.cpp" ]
-      libs += [ "EGL" ]
-    } else if (is_linux && skia_use_x11) {
-      sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
-      libs += [ "GL" ]
-    } else if (is_mac) {
-      sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
-    } else if (is_ios) {
-      sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
-    } else if (is_win) {
-      sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
-      if (target_cpu != "arm64") {
-        libs += [ "OpenGL32.lib" ]
-      }
-    } else {
-      sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
-    }
     sources += skia_gl_gpu_sources
   }
-
   if (skia_use_vulkan) {
     public_defines += [ "SK_VULKAN" ]
     deps += [ "third_party/vulkanmemoryallocator" ]
@@ -578,13 +577,6 @@
     }
   }
 
-  if (is_android && (skia_use_gl || skia_use_vulkan)) {
-    # this lib is required to link against AHardwareBuffer
-    if (defined(ndk_api) && ndk_api >= 26) {
-      libs += [ "android" ]
-    }
-  }
-
   if (skia_use_dawn) {
     public_defines += [ "SK_DAWN" ]
     sources += skia_dawn_sources
@@ -1384,39 +1376,45 @@
       "tools/gpu/YUVUtils.h",
       "tools/gpu/mock/MockTestContext.cpp",
     ]
-
-    libs = []
-
     if (skia_use_gl) {
       sources += [
         "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
         "tools/gpu/gl/GLTestContext.cpp",
         "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
       ]
-      if (is_android || skia_use_egl) {
-        sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
-      } else if (is_ios) {
-        sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
-        libs += [ "OpenGLES.framework" ]
-      } else if (is_linux) {
-        sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
-        libs += [
-          "GLU",
-          "X11",
-        ]
-      } else if (is_mac) {
-        sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
-      } else if (is_win) {
-        sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
-        libs += [ "Gdi32.lib" ]
-        if (target_cpu != "arm64") {
-          libs += [ "OpenGL32.lib" ]
-        }
+    }
+
+    libs = []
+
+    if (is_android || skia_use_egl) {
+      sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
+    } else if (is_ios) {
+      sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
+      libs += [ "OpenGLES.framework" ]
+    } else if (is_linux) {
+      sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
+      libs += [
+        "GLU",
+        "X11",
+      ]
+    } else if (is_mac) {
+      sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
+    } else if (is_win) {
+      sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
+      libs += [ "Gdi32.lib" ]
+      if (target_cpu != "arm64") {
+        libs += [ "OpenGL32.lib" ]
       }
-      if (skia_use_angle) {
-        deps += [ "//third_party/angle2" ]
-        sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
-      }
+    } else if (is_fuchsia && using_fuchsia_sdk) {
+      libs +=
+          [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
+    }
+
+    cflags_objcc = [ "-fobjc-arc" ]
+
+    if (skia_use_angle) {
+      deps += [ "//third_party/angle2" ]
+      sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
     }
 
     if (skia_use_vulkan) {
@@ -1435,13 +1433,6 @@
       sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ]
       cflags_cc = [ "-Wno-microsoft-cast" ]
     }
-
-    if (is_fuchsia && using_fuchsia_sdk) {
-      libs +=
-          [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
-    }
-
-    cflags_objcc = [ "-fobjc-arc" ]
   }  # test_lib("gpu_tool_utils")
 
   test_lib("flags") {
@@ -2192,7 +2183,7 @@
       libs = [ "android" ]
     }
   }
-  if (is_android && skia_use_gl) {
+  if (is_android && skia_enable_gpu) {
     test_app("skottie_android") {
       is_shared_library = true
 
@@ -2237,12 +2228,18 @@
     ]
     sources = [
       "tools/sk_app/CommandSet.cpp",
+      "tools/sk_app/GLWindowContext.cpp",
       "tools/sk_app/Window.cpp",
     ]
     libs = []
 
+    if (skia_use_dawn) {
+      sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
+    }
+
     if (is_android) {
       sources += [
+        "tools/sk_app/android/GLWindowContext_android.cpp",
         "tools/sk_app/android/RasterWindowContext_android.cpp",
         "tools/sk_app/android/Window_android.cpp",
         "tools/sk_app/android/main_android.cpp",
@@ -2251,27 +2248,50 @@
       libs += [ "android" ]
     } else if (is_linux) {
       sources += [
+        "tools/sk_app/unix/GLWindowContext_unix.cpp",
         "tools/sk_app/unix/RasterWindowContext_unix.cpp",
         "tools/sk_app/unix/Window_unix.cpp",
         "tools/sk_app/unix/keysym2ucs.c",
         "tools/sk_app/unix/main_unix.cpp",
       ]
+      if (skia_use_dawn) {
+        if (dawn_enable_vulkan) {
+          sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
+          defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
+          libs += [ "X11-xcb" ]
+        }
+      }
       libs += [
-        "GL",  # Used by raster window context, so cannot be behind skia_use_gl.
+        "GL",
         "X11",
       ]
     } else if (is_win) {
       sources += [
+        "tools/sk_app/win/GLWindowContext_win.cpp",
         "tools/sk_app/win/RasterWindowContext_win.cpp",
         "tools/sk_app/win/Window_win.cpp",
         "tools/sk_app/win/main_win.cpp",
       ]
+      if (skia_use_angle) {
+        sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
+      }
+      if (skia_use_dawn) {
+        if (dawn_enable_d3d12) {
+          sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ]
+        }
+      }
     } else if (is_mac) {
       sources += [
+        "tools/sk_app/mac/GLWindowContext_mac.mm",
         "tools/sk_app/mac/RasterWindowContext_mac.mm",
         "tools/sk_app/mac/Window_mac.mm",
         "tools/sk_app/mac/main_mac.mm",
       ]
+      if (skia_use_dawn) {
+        if (dawn_enable_metal) {
+          sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ]
+        }
+      }
       libs += [
         "QuartzCore.framework",
         "Cocoa.framework",
@@ -2279,6 +2299,7 @@
       ]
     } else if (is_ios) {
       sources += [
+        "tools/sk_app/ios/GLWindowContext_ios.mm",
         "tools/sk_app/ios/RasterWindowContext_ios.mm",
         "tools/sk_app/ios/Window_ios.mm",
         "tools/sk_app/ios/main_ios.mm",
@@ -2286,24 +2307,6 @@
       libs += [ "QuartzCore.framework" ]
     }
 
-    if (skia_use_gl) {
-      sources += [ "tools/sk_app/GLWindowContext.cpp" ]
-      if (is_android) {
-        sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ]
-      } else if (is_linux) {
-        sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ]
-      } else if (is_win) {
-        sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ]
-        if (skia_use_angle) {
-          sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
-        }
-      } else if (is_mac) {
-        sources += [ "tools/sk_app/mac/GLWindowContext_mac.mm" ]
-      } else if (is_ios) {
-        sources += [ "tools/sk_app/ios/GLWindowContext_ios.mm" ]
-      }
-    }
-
     if (skia_use_vulkan) {
       sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
       if (is_android) {
@@ -2325,32 +2328,13 @@
       }
     }
 
-    if (skia_use_dawn) {
-      sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
-      if (is_linux) {
-        if (dawn_enable_vulkan) {
-          sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
-          defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
-          libs += [ "X11-xcb" ]
-        }
-      } else if (is_win) {
-        if (dawn_enable_d3d12) {
-          sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ]
-        }
-      } else if (is_mac) {
-        if (dawn_enable_metal) {
-          sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ]
-        }
-      }
-    }
-
     deps = [
       ":tool_utils",
     ]
     if (is_android) {
       deps += [ "//third_party/native_app_glue" ]
     }
-    if (skia_use_gl && skia_use_angle) {
+    if (skia_use_angle) {
       deps += [ "//third_party/angle2" ]
     }
   }
@@ -2376,57 +2360,53 @@
       ]
     }
   }
+  test_app("viewer") {
+    is_shared_library = is_android
+    sources = [
+      "tools/viewer/AnimTimer.h",
+      "tools/viewer/BisectSlide.cpp",
+      "tools/viewer/GMSlide.cpp",
+      "tools/viewer/ImGuiLayer.cpp",
+      "tools/viewer/ImageSlide.cpp",
+      "tools/viewer/ParticlesSlide.cpp",
+      "tools/viewer/SKPSlide.cpp",
+      "tools/viewer/SampleSlide.cpp",
+      "tools/viewer/SkSLSlide.cpp",
+      "tools/viewer/SkottieSlide.cpp",
+      "tools/viewer/SlideDir.cpp",
+      "tools/viewer/StatsLayer.cpp",
+      "tools/viewer/SvgSlide.cpp",
+      "tools/viewer/TouchGesture.cpp",
+      "tools/viewer/TouchGesture.h",
+      "tools/viewer/Viewer.cpp",
+    ]
+    libs = []
 
-  # sk_app can work without GL but viewer always runs raster through a GL window context.
-  if (skia_use_gl) {
-    test_app("viewer") {
-      is_shared_library = is_android
-      sources = [
-        "tools/viewer/AnimTimer.h",
-        "tools/viewer/BisectSlide.cpp",
-        "tools/viewer/GMSlide.cpp",
-        "tools/viewer/ImGuiLayer.cpp",
-        "tools/viewer/ImageSlide.cpp",
-        "tools/viewer/ParticlesSlide.cpp",
-        "tools/viewer/SKPSlide.cpp",
-        "tools/viewer/SampleSlide.cpp",
-        "tools/viewer/SkSLSlide.cpp",
-        "tools/viewer/SkottieSlide.cpp",
-        "tools/viewer/SlideDir.cpp",
-        "tools/viewer/StatsLayer.cpp",
-        "tools/viewer/SvgSlide.cpp",
-        "tools/viewer/TouchGesture.cpp",
-        "tools/viewer/TouchGesture.h",
-        "tools/viewer/Viewer.cpp",
-      ]
-      libs = []
-
-      deps = [
-        ":common_flags_gpu",
-        ":experimental_svg_model",
-        ":flags",
-        ":gm",
-        ":gpu_tool_utils",
-        ":samples",
-        ":sk_app",
-        ":skia",
-        ":tool_utils",
-        ":trace",
-        "modules/particles",
-        "modules/skottie",
-        "modules/skottie:utils",
-        "modules/sksg",
-        "modules/sksg:samples",
-        "//third_party/imgui",
-      ]
-      if (skia_use_experimental_xform) {
-        deps += [ ":experimental_xform" ]
-        sources += [ "gm/xform.cpp" ]
-      }
+    deps = [
+      ":common_flags_gpu",
+      ":experimental_svg_model",
+      ":flags",
+      ":gm",
+      ":gpu_tool_utils",
+      ":samples",
+      ":sk_app",
+      ":skia",
+      ":tool_utils",
+      ":trace",
+      "modules/particles",
+      "modules/skottie",
+      "modules/skottie:utils",
+      "modules/sksg",
+      "modules/sksg:samples",
+      "//third_party/imgui",
+    ]
+    if (skia_use_experimental_xform) {
+      deps += [ ":experimental_xform" ]
+      sources += [ "gm/xform.cpp" ]
     }
   }
 
-  if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) {
+  if (!skia_use_angle && (is_linux || is_win || is_mac)) {
     test_app("HelloWorld") {
       sources = [
         "example/HelloWorld.cpp",
@@ -2443,8 +2423,8 @@
     }
   }
 
-  if (skia_use_gl && (is_linux || is_mac || is_ios) &&
-      target_cpu != "mips64el" && target_cpu != "loongson3a") {
+  if ((is_linux || is_mac || is_ios) && target_cpu != "mips64el" &&
+      target_cpu != "loongson3a") {
     test_app("SkiaSDLExample") {
       sources = [
         "example/SkiaSDLExample.cpp",
@@ -2559,7 +2539,7 @@
     ]
   }
 
-  if (skia_use_gl && skia_use_icu && skia_use_harfbuzz) {
+  if (skia_use_icu && skia_use_harfbuzz) {
     test_app("editor") {
       is_shared_library = is_android
       deps = [
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index cbf02ba..74c0bb2 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -7,8 +7,6 @@
 Milestone 83
 
 <Insert new notes here- top is most recent.>
-  * Made non-GL builds of GPU backend more robust.
-    https://review.skia.org/277456
 
   * 
 
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 06ee02f..f96ccea 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -252,7 +252,6 @@
         return true;
     }
     void fillOptions(NanoJSONResultsWriter& log) override {
-#ifdef SK_GL
         const GrGLubyte* version;
         if (this->contextInfo.backend() == GrBackendApi::kOpenGL) {
             const GrGLInterface* gl =
@@ -270,7 +269,6 @@
             GR_GL_CALL_RET(gl, version, GetString(GR_GL_SHADING_LANGUAGE_VERSION));
             log.appendString("GL_SHADING_LANGUAGE_VERSION", (const char*) version);
         }
-#endif
     }
 
     void dumpStats() override {
diff --git a/experimental/wasm-skp-debugger/compile.sh b/experimental/wasm-skp-debugger/compile.sh
index ead1d5a..35d3c4e 100755
--- a/experimental/wasm-skp-debugger/compile.sh
+++ b/experimental/wasm-skp-debugger/compile.sh
@@ -46,7 +46,7 @@
     --align 4
 
 GN_GPU_FLAGS="\"-DSK_DISABLE_LEGACY_SHADERCONTEXT\","
-WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 -DSK_GL \
+WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 \
           -DSK_DISABLE_LEGACY_SHADERCONTEXT --pre-js $BASE_DIR/cpu.js --pre-js $BASE_DIR/gpu.js"
 
 # Turn off exiting while we check for ninja (which may not be on PATH)
diff --git a/experimental/wasm-skp-debugger/debugger_bindings.cpp b/experimental/wasm-skp-debugger/debugger_bindings.cpp
index 5b5090d..6c41446 100644
--- a/experimental/wasm-skp-debugger/debugger_bindings.cpp
+++ b/experimental/wasm-skp-debugger/debugger_bindings.cpp
@@ -22,7 +22,7 @@
 #include <emscripten.h>
 #include <emscripten/bind.h>
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrContext.h"
 #include "include/gpu/gl/GrGLInterface.h"
@@ -369,7 +369,7 @@
       int fInspectedLayer = -1;
 };
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 sk_sp<GrContext> MakeGrContext(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context)
 {
     EMSCRIPTEN_RESULT r = emscripten_webgl_make_context_current(context);
@@ -507,7 +507,7 @@
       self.clear(SkColor(color));
     }));
 
-  #ifdef SK_GL
+  #if SK_SUPPORT_GPU
     class_<GrContext>("GrContext")
         .smart_ptr<sk_sp<GrContext>>("sk_sp<GrContext>");
     function("currentContext", &emscripten_webgl_get_current_context);
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index 6f87c9d..52a5984 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -48,7 +48,7 @@
 #include "src/utils/SkUTF.h"
 #include "tools/flags/CommandLineFlags.h"
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 #include "include/gpu/gl/GrGLFunctions.h"
 #include "src/gpu/GrContextPriv.h"
 #include "src/gpu/gl/GrGLGpu.h"
@@ -1607,7 +1607,7 @@
     canvas.restore();
 }
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 
 static void dump_GPU_info(GrContext* context) {
     const GrGLInterface* gl = static_cast<GrGLGpu*>(context->priv().getGpu())
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp
index 9bcc4cd..8a8e493 100644
--- a/gm/rectangletexture.cpp
+++ b/gm/rectangletexture.cpp
@@ -5,11 +5,9 @@
  * found in the LICENSE file.
  */
 
-// This test only works with the GL backend.
+// This test only works with the GPU backend.
 
 #include "gm/gm.h"
-
-#ifdef SK_GL
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
@@ -272,4 +270,3 @@
 
 DEF_GM(return new RectangleTexture;)
 }
-#endif
diff --git a/gn/tests.gni b/gn/tests.gni
index bebda05..cf462c1 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -15,7 +15,6 @@
   "$_tests/ApplyGammaTest.cpp",
   "$_tests/ArenaAllocTest.cpp",
   "$_tests/AsADashTest.cpp",
-  "$_tests/BackendAllocationTest.cpp",
   "$_tests/BadIcoTest.cpp",
   "$_tests/BitSetTest.cpp",
   "$_tests/BitmapCopyTest.cpp",
@@ -49,7 +48,6 @@
   "$_tests/ColorPrivTest.cpp",
   "$_tests/ColorSpaceTest.cpp",
   "$_tests/ColorTest.cpp",
-  "$_tests/CompressedBackendAllocationTest.cpp",
   "$_tests/CopySurfaceTest.cpp",
   "$_tests/CubicMapTest.cpp",
   "$_tests/DebugLayerManagerTest.cpp",
@@ -198,7 +196,6 @@
   "$_tests/ProgramsTest.cpp",
   "$_tests/PromiseImageTest.cpp",
   "$_tests/ProxyConversionTest.cpp",
-  "$_tests/ProxyTest.cpp",
   "$_tests/ProxyRefTest.cpp",
   "$_tests/QuickRejectTest.cpp",
   "$_tests/RRectInPathTest.cpp",
@@ -220,7 +217,6 @@
   "$_tests/RenderTargetContextTest.cpp",
   "$_tests/RepeatedClippedBlurTest.cpp",
   "$_tests/ResourceAllocatorTest.cpp",
-  "$_tests/ResourceCacheTest.cpp",
   "$_tests/RoundRectTest.cpp",
   "$_tests/SRGBReadWritePixelsTest.cpp",
   "$_tests/SRGBTest.cpp",
@@ -279,7 +275,6 @@
   "$_tests/StrokerTest.cpp",
   "$_tests/SubsetPath.cpp",
   "$_tests/SubsetPath.h",
-  "$_tests/SurfaceSemaphoreTest.cpp",
   "$_tests/SurfaceTest.cpp",
   "$_tests/SwizzlerTest.cpp",
   "$_tests/TArrayTest.cpp",
@@ -298,7 +293,6 @@
   "$_tests/TextureStripAtlasManagerTest.cpp",
   "$_tests/Time.cpp",
   "$_tests/TopoSortTest.cpp",
-  "$_tests/TraceMemoryDumpTest.cpp",
   "$_tests/TracingTest.cpp",
   "$_tests/TransferPixelsTest.cpp",
   "$_tests/TypefaceTest.cpp",
@@ -321,10 +315,16 @@
 ]
 
 gl_tests_sources = [
+  "$_tests/BackendAllocationTest.cpp",
+  "$_tests/CompressedBackendAllocationTest.cpp",
   "$_tests/EGLImageTest.cpp",
   "$_tests/GrGLExtensionsTest.cpp",
+  "$_tests/ProxyTest.cpp",
   "$_tests/RectangleTextureTest.cpp",
+  "$_tests/ResourceCacheTest.cpp",
+  "$_tests/SurfaceSemaphoreTest.cpp",
   "$_tests/TextureBindingsResetTest.cpp",
+  "$_tests/TraceMemoryDumpTest.cpp",
 ]
 
 metal_tests_sources = [
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 036f992..93eda2a 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -248,15 +248,9 @@
  * and opting in to additional backends. TODO: Require explicit opt in for GL.
  */
 #if SK_SUPPORT_GPU
-#  if !defined(SK_GL) && !defined(SK_VULKAN) && !defined(SK_METAL) && !defined(SK_DAWN) && !defined(SK_DIRECT3D)
+#  if !defined(SK_GL) && !defined(SK_VULKAN) && !defined(SK_METAL)
 #    define SK_GL
 #  endif
-#else
-#  undef SK_GL
-#  undef SK_VULKAN
-#  undef SK_METAL
-#  undef SK_DAWN
-#  undef SK_DIRECT3D
 #endif
 
 #if !defined(SK_SUPPORT_ATLAS_TEXT)
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index da1072d..62e5c71 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -47,7 +47,6 @@
 
 class SK_API GrContext : public GrRecordingContext {
 public:
-#ifdef SK_GL
     /**
      * Creates a GrContext for a backend context. If no GrGLInterface is provided then the result of
      * GrGLMakeNativeInterface() is used if it succeeds.
@@ -56,7 +55,6 @@
     static sk_sp<GrContext> MakeGL(sk_sp<const GrGLInterface>);
     static sk_sp<GrContext> MakeGL(const GrContextOptions&);
     static sk_sp<GrContext> MakeGL();
-#endif
 
     /**
      * The Vulkan context (VkQueue, VkDevice, VkInstance) must be kept alive until the returned
diff --git a/infra/bots/recipe_modules/build/default.py b/infra/bots/recipe_modules/build/default.py
index 310b05d..cf14a45 100644
--- a/infra/bots/recipe_modules/build/default.py
+++ b/infra/bots/recipe_modules/build/default.py
@@ -213,7 +213,6 @@
     args['is_debug'] = 'false'
   if 'Dawn' in extra_tokens:
     args['skia_use_dawn'] = 'true'
-    args['skia_use_gl'] = 'false'
     # Dawn imports jinja2, which imports markupsafe. Along with DEPS, make it
     # importable.
     env['PYTHONPATH'] = api.path.pathsep.join([
@@ -271,15 +270,12 @@
   if 'Vulkan' in extra_tokens and not 'Android' in extra_tokens:
     args['skia_use_vulkan'] = 'true'
     args['skia_enable_vulkan_debug_layers'] = 'true'
-    args['skia_use_gl'] = 'false'
     if 'MoltenVK' in extra_tokens:
       args['skia_moltenvk_path'] = '"%s"' % moltenvk
   if 'Direct3D' in extra_tokens:
     args['skia_use_direct3d'] = 'true'
-    args['skia_use_gl'] = 'false'
   if 'Metal' in extra_tokens:
     args['skia_use_metal'] = 'true'
-    args['skia_use_gl'] = 'false'
   if 'OpenCL' in extra_tokens:
     args['skia_use_opencl'] = 'true'
     if api.vars.is_linux:
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-x86_64-Release-Vulkan.json
index ccd44a4..c9a5075 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian9-Clang-x86_64-Release-Vulkan.json
@@ -52,7 +52,7 @@
       "[START_DIR]/cache/work/skia/bin/gn",
       "gen",
       "[START_DIR]/cache/work/skia/out/Build-Debian9-Clang-x86_64-Release-Vulkan/Release",
-      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cc_wrapper=\"[START_DIR]/ccache_linux/bin/ccache\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DDUMMY_clang_linux_version=42\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_use_gl=false skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
+      "--args=cc=\"[START_DIR]/clang_linux/bin/clang\" cc_wrapper=\"[START_DIR]/ccache_linux/bin/ccache\" cxx=\"[START_DIR]/clang_linux/bin/clang++\" extra_cflags=[\"-B[START_DIR]/clang_linux/bin\", \"-DDUMMY_clang_linux_version=42\"] extra_ldflags=[\"-B[START_DIR]/clang_linux/bin\", \"-fuse-ld=lld\", \"-L[START_DIR]/clang_linux/lib\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
     ],
     "cwd": "[START_DIR]/cache/work/skia",
     "env": {
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json
index 9ac26a0..3faab04 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json
@@ -70,7 +70,7 @@
       "[START_DIR]/cache/work/skia/bin/gn",
       "gen",
       "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-Metal/Debug",
-      "--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_use_gl=false skia_use_metal=true target_cpu=\"x86_64\" werror=true"
+      "--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_use_metal=true target_cpu=\"x86_64\" werror=true"
     ],
     "cwd": "[START_DIR]/cache/work/skia",
     "env": {
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan.json
index 36df397..f285863 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan.json
@@ -70,7 +70,7 @@
       "[START_DIR]/cache/work/skia/bin/gn",
       "gen",
       "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan/Release",
-      "--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_moltenvk_path=\"[START_DIR]/moltenvk\" skia_use_gl=false skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
+      "--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_moltenvk_path=\"[START_DIR]/moltenvk\" skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
     ],
     "cwd": "[START_DIR]/cache/work/skia",
     "env": {
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json
index 8272f9f..748018c 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json
@@ -36,7 +36,7 @@
       "[START_DIR]\\cache\\work\\skia\\bin\\gn",
       "gen",
       "[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Dawn\\Release_x64",
-      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_use_dawn=true skia_use_gl=false target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
+      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_use_dawn=true target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
     ],
     "cwd": "[START_DIR]\\cache\\work\\skia",
     "env": {
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json
index f8102ef..dbc0c18 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json
@@ -36,7 +36,7 @@
       "[START_DIR]\\cache\\work\\skia\\bin\\gn",
       "gen",
       "[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Direct3D\\Release_x64",
-      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_use_direct3d=true skia_use_gl=false target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
+      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_use_direct3d=true target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
     ],
     "cwd": "[START_DIR]\\cache\\work\\skia",
     "env": {
diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
index a53ec69..45f014d 100644
--- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
+++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json
@@ -36,7 +36,7 @@
       "[START_DIR]\\cache\\work\\skia\\bin\\gn",
       "gen",
       "[START_DIR]\\cache\\work\\skia\\out\\Build-Win-Clang-x86_64-Release-Vulkan\\Release_x64",
-      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_use_gl=false skia_use_vulkan=true target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
+      "--args=cc=\"clang\" clang_win=\"[START_DIR]\\clang_win\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_clang_win_version=42\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_use_vulkan=true target_cpu=\"x86_64\" werror=true win_sdk=\"[START_DIR]\\win_toolchain/win_sdk\" win_vc=\"[START_DIR]\\win_toolchain/VC\""
     ],
     "cwd": "[START_DIR]\\cache\\work\\skia",
     "env": {
diff --git a/modules/canvaskit/canvaskit_bindings.cpp b/modules/canvaskit/canvaskit_bindings.cpp
index 3eaf858..a39e3a7 100644
--- a/modules/canvaskit/canvaskit_bindings.cpp
+++ b/modules/canvaskit/canvaskit_bindings.cpp
@@ -59,7 +59,7 @@
 #include <emscripten.h>
 #include <emscripten/bind.h>
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrContext.h"
 #include "include/gpu/gl/GrGLInterface.h"
@@ -147,7 +147,7 @@
     return SkImageInfo::Make(sii.width, sii.height, sii.colorType, sii.alphaType);
 }
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
 sk_sp<GrContext> MakeGrContext(EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context)
 {
     EMSCRIPTEN_RESULT r = emscripten_webgl_make_context_current(context);
@@ -722,7 +722,7 @@
 // types Pi, Pf").  But, we can just pretend they are numbers and cast them to be pointers and
 // the compiler is happy.
 EMSCRIPTEN_BINDINGS(Skia) {
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
     function("currentContext", &emscripten_webgl_get_current_context);
     function("setCurrentContext", &emscripten_webgl_make_context_current);
     function("MakeGrContext", &MakeGrContext);
@@ -918,7 +918,7 @@
                                                      flags, &localMatrix);
     }), allow_raw_pointers());
 
-#ifdef SK_GL
+#if SK_SUPPORT_GPU
     class_<GrContext>("GrContext")
         .smart_ptr<sk_sp<GrContext>>("sk_sp<GrContext>")
         .function("getResourceCacheLimitBytes", optional_override([](GrContext& self)->size_t {
diff --git a/modules/canvaskit/compile.sh b/modules/canvaskit/compile.sh
index a100186..6783b7f 100755
--- a/modules/canvaskit/compile.sh
+++ b/modules/canvaskit/compile.sh
@@ -57,7 +57,7 @@
 
 GN_GPU="skia_enable_gpu=true skia_gl_standard = \"webgl\""
 GN_GPU_FLAGS="\"-DSK_DISABLE_LEGACY_SHADERCONTEXT\","
-WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 -DSK_GL \
+WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 \
           -DSK_DISABLE_LEGACY_SHADERCONTEXT --pre-js $BASE_DIR/cpu.js --pre-js $BASE_DIR/gpu.js\
           -s USE_WEBGL2=1"
 if [[ $@ == *cpu* ]]; then
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index 7705c61..fb7f7a6 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -16,7 +16,6 @@
 #include "src/core/SkRectPriv.h"
 #include "src/gpu/GrClip.h"
 #include "src/gpu/GrContextPriv.h"
-#include "src/gpu/GrGpu.h"
 #include "src/gpu/GrMemoryPool.h"
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrRenderTargetContextPriv.h"
@@ -27,13 +26,10 @@
 #include "src/gpu/ccpr/GrGSCoverageProcessor.h"
 #include "src/gpu/ccpr/GrVSCoverageProcessor.h"
 #include "src/gpu/geometry/GrPathUtils.h"
+#include "src/gpu/gl/GrGLGpu.h"
 #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/ops/GrDrawOp.h"
 
-#ifdef SK_GL
-#include "src/gpu/gl/GrGLGpu.h"
-#endif
-
 using TriPointInstance = GrCCCoverageProcessor::TriPointInstance;
 using QuadPointInstance = GrCCCoverageProcessor::QuadPointInstance;
 using PrimitiveType = GrCCCoverageProcessor::PrimitiveType;
@@ -329,7 +325,6 @@
                                                       const SkRect& chainBounds) {
     GrResourceProvider* rp = state->resourceProvider();
     GrContext* context = state->gpu()->getContext();
-#ifdef SK_GL
     GrGLGpu* glGpu = GrBackendApi::kOpenGL == context->backend()
                              ? static_cast<GrGLGpu*>(state->gpu())
                              : nullptr;
@@ -338,7 +333,6 @@
         // GR_GL_CALL(glGpu->glInterface(), PolygonMode(GR_GL_FRONT_AND_BACK, GR_GL_LINE));
         GR_GL_CALL(glGpu->glInterface(), Enable(GR_GL_LINE_SMOOTH));
     }
-#endif
 
     GrPipeline pipeline(GrScissorTest::kDisabled, SkBlendMode::kPlus,
                         state->drawOpArgs().outputSwizzle());
@@ -401,11 +395,9 @@
         stroker.drawStrokes(state, proc.get(), batchID, ibounds);
     }
 
-#ifdef SK_GL
     if (glGpu) {
         context->resetContext(kMisc_GrGLBackendState);
     }
-#endif
 }
 
 class CCPRGeometryView::Click : public Sample::Click {
diff --git a/src/gpu/GrBackendSurface.cpp b/src/gpu/GrBackendSurface.cpp
index f313940..a8f44d8 100644
--- a/src/gpu/GrBackendSurface.cpp
+++ b/src/gpu/GrBackendSurface.cpp
@@ -92,7 +92,6 @@
             SK_ABORT("Unexpected texture target");
     }
 }
-#endif
 
 GrGLFormat GrBackendFormat::asGLFormat() const {
     if (this->isValid() && GrBackendApi::kOpenGL == fBackend) {
@@ -100,6 +99,7 @@
     }
     return GrGLFormat::kUnknown;
 }
+#endif
 
 GrBackendFormat GrBackendFormat::MakeVk(const GrVkYcbcrConversionInfo& ycbcrInfo) {
     SkASSERT(ycbcrInfo.isValid());
diff --git a/tools/sk_app/Window.h b/tools/sk_app/Window.h
index 22b24f6..76be662 100644
--- a/tools/sk_app/Window.h
+++ b/tools/sk_app/Window.h
@@ -45,9 +45,7 @@
     virtual bool scaleContentToFit() const { return false; }
 
     enum BackendType {
-#ifdef SK_GL
         kNativeGL_BackendType,
-#endif
 #if SK_ANGLE && defined(SK_BUILD_FOR_WIN)
         kANGLE_BackendType,
 #endif
diff --git a/tools/sk_app/android/Window_android.cpp b/tools/sk_app/android/Window_android.cpp
index 129686b..f1924c4 100644
--- a/tools/sk_app/android/Window_android.cpp
+++ b/tools/sk_app/android/Window_android.cpp
@@ -47,15 +47,11 @@
 void Window_android::initDisplay(ANativeWindow* window) {
     SkASSERT(window);
     switch (fBackendType) {
-#ifdef SK_GL
         case kNativeGL_BackendType:
         default:
             fWindowContext =
                     window_context_factory::MakeGLForAndroid(window, fRequestedDisplayParams);
             break;
-#else
-        default:
-#endif
         case kRaster_BackendType:
             fWindowContext =
                     window_context_factory::MakeRasterForAndroid(window, fRequestedDisplayParams);
diff --git a/tools/sk_app/ios/Window_ios.mm b/tools/sk_app/ios/Window_ios.mm
index 36f50fc..82d8a73 100644
--- a/tools/sk_app/ios/Window_ios.mm
+++ b/tools/sk_app/ios/Window_ios.mm
@@ -80,22 +80,18 @@
     info.fWindow = this;
     info.fViewController = fWindow.rootViewController;
     switch (attachType) {
+        case kRaster_BackendType:
+            fWindowContext = MakeRasterForIOS(info, fRequestedDisplayParams);
+            break;
 #ifdef SK_METAL
         case kMetal_BackendType:
             fWindowContext = MakeMetalForIOS(info, fRequestedDisplayParams);
             break;
 #endif
-#ifdef SK_GL
         case kNativeGL_BackendType:
         default:
             fWindowContext = MakeGLForIOS(info, fRequestedDisplayParams);
             break;
-#else
-        default:
-#endif
-        case kRaster_BackendType:
-            fWindowContext = MakeRasterForIOS(info, fRequestedDisplayParams);
-            break;
     }
     this->onBackendCreated();
 
diff --git a/tools/sk_app/mac/Window_mac.mm b/tools/sk_app/mac/Window_mac.mm
index 38b1253..8b6280e 100644
--- a/tools/sk_app/mac/Window_mac.mm
+++ b/tools/sk_app/mac/Window_mac.mm
@@ -119,6 +119,9 @@
     window_context_factory::MacWindowInfo info;
     info.fMainView = [fWindow contentView];
     switch (attachType) {
+        case kRaster_BackendType:
+            fWindowContext = MakeRasterForMac(info, fRequestedDisplayParams);
+            break;
 #ifdef SK_DAWN
         case kDawn_BackendType:
             fWindowContext = MakeDawnMTLForMac(info, fRequestedDisplayParams);
@@ -134,17 +137,10 @@
             fWindowContext = MakeMetalForMac(info, fRequestedDisplayParams);
             break;
 #endif
-#ifdef SK_GL
         case kNativeGL_BackendType:
         default:
             fWindowContext = MakeGLForMac(info, fRequestedDisplayParams);
             break;
-#else
-        default:
-#endif
-        case kRaster_BackendType:
-            fWindowContext = MakeRasterForMac(info, fRequestedDisplayParams);
-            break;
     }
     this->onBackendCreated();
 
diff --git a/tools/sk_app/unix/Window_unix.cpp b/tools/sk_app/unix/Window_unix.cpp
index f46e10d..32e0447 100644
--- a/tools/sk_app/unix/Window_unix.cpp
+++ b/tools/sk_app/unix/Window_unix.cpp
@@ -370,12 +370,10 @@
                     window_context_factory::MakeVulkanForXlib(winInfo, fRequestedDisplayParams);
             break;
 #endif
-#ifdef SK_GL
         case kNativeGL_BackendType:
             fWindowContext =
                     window_context_factory::MakeGLForXlib(winInfo, fRequestedDisplayParams);
             break;
-#endif
         case kRaster_BackendType:
             fWindowContext =
                     window_context_factory::MakeRasterForXlib(winInfo, fRequestedDisplayParams);
diff --git a/tools/sk_app/win/Window_win.cpp b/tools/sk_app/win/Window_win.cpp
index 9afe088..43ed343 100644
--- a/tools/sk_app/win/Window_win.cpp
+++ b/tools/sk_app/win/Window_win.cpp
@@ -350,11 +350,9 @@
     fBackend = attachType;
 
     switch (attachType) {
-#ifdef SK_GL
         case kNativeGL_BackendType:
             fWindowContext = window_context_factory::MakeGLForWin(fHWnd, fRequestedDisplayParams);
             break;
-#endif
 #if SK_ANGLE
         case kANGLE_BackendType:
             fWindowContext =
diff --git a/tools/skottie_ios_app/GrContextHolder.mm b/tools/skottie_ios_app/GrContextHolder.mm
index 6a01c60..32092219 100644
--- a/tools/skottie_ios_app/GrContextHolder.mm
+++ b/tools/skottie_ios_app/GrContextHolder.mm
@@ -11,11 +11,9 @@
 #include "include/gpu/GrContextOptions.h"
 #include "include/gpu/gl/GrGLInterface.h"
 
-#ifdef SK_GL
 GrContextHolder SkMakeGLContext() {
     return GrContextHolder(GrContext::MakeGL(nullptr, GrContextOptions()).release());
 }
-#endif
 
 void GrContextRelease::operator()(GrContext* ptr) { SkSafeUnref(ptr); }
 
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 665da4a..b1c3819 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -131,10 +131,6 @@
 
 static DEFINE_bool(offscreen, false, "Force rendering to an offscreen surface.");
 
-#ifndef SK_GL
-static_assert(false, "viewer requires GL backend for raster.")
-#endif
-
 const char* kBackendTypeStrings[sk_app::Window::kBackendTypeCount] = {
     "OpenGL",
 #if SK_ANGLE && defined(SK_BUILD_FOR_WIN)