Move pixel config getter to private in GrBackendSurface

We eventually want to remove pixel config from GrBackendSurface so this
helps to insure that clients don't rely on it.

Bug: skia:
Change-Id: I6b8435d12347fab62c0f9032addea1211aa703ca
Reviewed-on: https://skia-review.googlesource.com/70642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index bf1e52c..c9d326b 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -51,7 +51,6 @@
 
     int width() const { return fWidth; }
     int height() const { return fHeight; }
-    GrPixelConfig config() const { return fConfig; }
     bool hasMipMaps() const { return GrMipMapped::kYes == fMipMapped; }
     GrBackend backend() const {return fBackend; }
 
@@ -73,6 +72,13 @@
     bool isValid() const { return fConfig != kUnknown_GrPixelConfig; }
 
 private:
+    // Friending for access to the GrPixelConfig
+    friend class SkSurface;
+    friend class GrGpu;
+    friend class GrGLGpu;
+    friend class GrVkGpu;
+    GrPixelConfig config() const { return fConfig; }
+
     int fWidth;         //<! width in pixels
     int fHeight;        //<! height in pixels
     GrPixelConfig fConfig;
@@ -109,7 +115,6 @@
     int height() const { return fHeight; }
     int sampleCnt() const { return fSampleCnt; }
     int stencilBits() const { return fStencilBits; }
-    GrPixelConfig config() const { return fConfig; }
     GrBackend backend() const {return fBackend; }
 
     // If the backend API is GL, this returns a pointer to the GrGLFramebufferInfo struct. Otherwise
@@ -123,6 +128,13 @@
 #endif
 
 private:
+    // Friending for access to the GrPixelConfig
+    friend class SkSurface;
+    friend class GrGpu;
+    friend class GrGLGpu;
+    friend class GrVkGpu;
+    GrPixelConfig config() const { return fConfig; }
+
     int fWidth;         //<! width in pixels
     int fHeight;        //<! height in pixels