Make GrCaps and GrShaderCaps private.

Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps().

Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866
Reviewed-on: https://skia-review.googlesource.com/127389
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp
index 98205d2..3f3c51e 100644
--- a/gm/bitmapshader.cpp
+++ b/gm/bitmapshader.cpp
@@ -5,12 +5,17 @@
  * found in the LICENSE file.
  */
 #include "gm.h"
-#include "sk_tool_utils.h"
 
 #include "SkBitmap.h"
 #include "SkPaint.h"
 #include "SkShader.h"
+#include "sk_tool_utils.h"
+
+#if SK_SUPPORT_GPU
+#include "GrCaps.h"
 #include "GrContext.h"
+#include "GrContextPriv.h"
+#endif
 
 namespace skiagm {
 
@@ -116,9 +121,11 @@
     // (See https://skia-review.googlesource.com/c/skia/+/73200)
     int bitmapW = 1;
     int bitmapH = 60000;
+#if SK_SUPPORT_GPU
     if (auto* ctx = canvas->getGrContext()) {
-        bitmapH = ctx->caps()->maxTextureSize() + 1;
+        bitmapH = ctx->contextPriv().caps()->maxTextureSize() + 1;
     }
+#endif
     bitmap.setInfo(SkImageInfo::MakeA8(bitmapW, bitmapH), bitmapW);
     uint8_t* pixels = new uint8_t[bitmapH];
     for(int i = 0; i < bitmapH; ++i) {