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>
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index fb7f7a6..7705c61 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -16,6 +16,7 @@
 #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"
@@ -26,10 +27,13 @@
 #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;
@@ -325,6 +329,7 @@
                                                       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;
@@ -333,6 +338,7 @@
         // 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());
@@ -395,9 +401,11 @@
         stroker.drawStrokes(state, proc.get(), batchID, ibounds);
     }
 
+#ifdef SK_GL
     if (glGpu) {
         context->resetContext(kMisc_GrGLBackendState);
     }
+#endif
 }
 
 class CCPRGeometryView::Click : public Sample::Click {