Make VertexBinding's member variables private

The patch decorates all members in VertexBinding as private and limits
access to them only through getters and setters. This makes it easier to
debug and keep track of any assignments to the class members.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c
Reviewed-on: https://chromium-review.googlesource.com/530786
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index 07941d5..46592e5 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -63,7 +63,7 @@
         return false;
     }
 
-    gl::Buffer *buffer = binding.buffer.get();
+    gl::Buffer *buffer = binding.getBuffer().get();
     if (!buffer)
     {
         return false;
@@ -149,7 +149,7 @@
     }
 
     // If specified with immediate data, we must use dynamic storage.
-    auto *buffer = binding.buffer.get();
+    auto *buffer = binding.getBuffer().get();
     if (!buffer)
     {
         return VertexStorageType::DYNAMIC;
@@ -248,7 +248,7 @@
         translated->attribute        = &attrib;
         translated->binding          = &binding;
         translated->currentValueType = currentValueData.Type;
-        translated->divisor          = binding.divisor;
+        translated->divisor          = binding.getDivisor();
 
         switch (ClassifyAttributeStorage(attrib, binding))
         {
@@ -297,7 +297,7 @@
     const auto &attrib  = *directAttrib->attribute;
     const auto &binding = *directAttrib->binding;
 
-    gl::Buffer *buffer   = binding.buffer.get();
+    gl::Buffer *buffer   = binding.getBuffer().get();
     BufferD3D *bufferD3D = buffer ? GetImplAs<BufferD3D>(buffer) : nullptr;
 
     ASSERT(DirectStoragePossible(attrib, binding));
@@ -309,7 +309,7 @@
         static_cast<unsigned int>(ComputeVertexAttributeOffset(attrib, binding));
 
     // Instanced vertices do not apply the 'start' offset
-    directAttrib->usesFirstVertexOffset = (binding.divisor == 0);
+    directAttrib->usesFirstVertexOffset = (binding.getDivisor() == 0);
 }
 
 // static
@@ -319,7 +319,7 @@
     const auto &attrib  = *translated->attribute;
     const auto &binding = *translated->binding;
 
-    gl::Buffer *buffer = binding.buffer.get();
+    gl::Buffer *buffer = binding.getBuffer().get();
     ASSERT(buffer && attrib.enabled && !DirectStoragePossible(attrib, binding));
     BufferD3D *bufferD3D = GetImplAs<BufferD3D>(buffer);
 
@@ -370,7 +370,7 @@
     translated->baseOffset = streamOffset + firstElementOffset;
 
     // Instanced vertices do not apply the 'start' offset
-    translated->usesFirstVertexOffset = (binding.divisor == 0);
+    translated->usesFirstVertexOffset = (binding.getDivisor() == 0);
 
     return gl::NoError();
 }
@@ -428,7 +428,7 @@
         ASSERT(dynamicAttrib.attribute && dynamicAttrib.binding);
         const auto &binding       = *dynamicAttrib.binding;
 
-        gl::Buffer *buffer        = binding.buffer.get();
+        gl::Buffer *buffer = binding.getBuffer().get();
         if (buffer)
         {
             BufferD3D *bufferD3D = GetImplAs<BufferD3D>(buffer);
@@ -448,7 +448,7 @@
 
     ASSERT(!DirectStoragePossible(attrib, binding));
 
-    gl::Buffer *buffer   = binding.buffer.get();
+    gl::Buffer *buffer   = binding.getBuffer().get();
     BufferD3D *bufferD3D = buffer ? GetImplAs<BufferD3D>(buffer) : nullptr;
     ASSERT(!bufferD3D || bufferD3D->getStaticVertexBuffer(attrib, binding) == nullptr);
 
@@ -470,14 +470,14 @@
     const auto &attrib  = *translated->attribute;
     const auto &binding = *translated->binding;
 
-    gl::Buffer *buffer = binding.buffer.get();
+    gl::Buffer *buffer = binding.getBuffer().get();
     ASSERT(buffer || attrib.pointer);
     ASSERT(attrib.enabled);
 
     BufferD3D *storage = buffer ? GetImplAs<BufferD3D>(buffer) : nullptr;
 
     // Instanced vertices do not apply the 'start' offset
-    GLint firstVertexIndex = (binding.divisor > 0 ? 0 : start);
+    GLint firstVertexIndex = (binding.getDivisor() > 0 ? 0 : start);
 
     // Compute source data pointer
     const uint8_t *sourceData = nullptr;