Add direct getter for GrCaps to GrContext.

TBR=joshualitt@google.com

Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99

Review URL: https://codereview.chromium.org/1149773005
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 2fba1f0..cd15580 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -43,6 +43,7 @@
 
 #if SK_SUPPORT_GPU
     #include "gl/GrGLDefines.h"
+    #include "GrCaps.h"
     #include "GrContextFactory.h"
     SkAutoTDelete<GrContextFactory> gGrFactory;
 #endif
@@ -372,7 +373,7 @@
         return false;
     }
     if (const GrContext* ctx = gGrFactory->get(ctxType)) {
-        return sampleCnt <= ctx->getMaxSampleCount();
+        return sampleCnt <= ctx->caps()->maxSampleCount();
     }
     return false;
 }