Remove fIntendedType from GrMtlBuffer. Add accessor to base class

Fixes unused member warning-as-error.

Change-Id: I9468a1b1cb106eeb7818afe87f5cda7eb75910de
Reviewed-on: https://skia-review.googlesource.com/c/189497
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/mtl/GrMtlBuffer.mm b/src/gpu/mtl/GrMtlBuffer.mm
index 48c5df8..be81357 100644
--- a/src/gpu/mtl/GrMtlBuffer.mm
+++ b/src/gpu/mtl/GrMtlBuffer.mm
@@ -28,7 +28,6 @@
 GrMtlBuffer::GrMtlBuffer(GrMtlGpu* gpu, size_t size, GrGpuBufferType intendedType,
                          GrAccessPattern accessPattern)
         : INHERITED(gpu, size, intendedType, accessPattern)
-        , fIntendedType(intendedType)
         , fIsDynamic(accessPattern == kDynamic_GrAccessPattern) {
     // TODO: We are treating all buffers as static access since we don't have an implementation to
     // synchronize gpu and cpu access of a resource yet. See comments in GrMtlBuffer::internalMap()
@@ -170,10 +169,10 @@
 #ifdef SK_DEBUG
 void GrMtlBuffer::validate() const {
     SkASSERT(fMtlBuffer == nil ||
-             fIntendedType == GrGpuBufferType::kVertex ||
-             fIntendedType == GrGpuBufferType::kIndex ||
-             fIntendedType == GrGpuBufferType::kXferCpuToGpu ||
-             fIntendedType == GrGpuBufferType::kXferGpuToCpu);
+             this->intendedType() == GrGpuBufferType::kVertex ||
+             this->intendedType() == GrGpuBufferType::kIndex ||
+             this->intendedType() == GrGpuBufferType::kXferCpuToGpu ||
+             this->intendedType() == GrGpuBufferType::kXferGpuToCpu);
     SkASSERT(fMappedBuffer == nil || fMtlBuffer == nil ||
              fMappedBuffer.length <= fMtlBuffer.length);
     SkASSERT(fIsDynamic == false); // TODO: implement synchronization to allow dynamic access.