Share data between VertexArray and Impl.

Using the same design as for the Framebuffer::Data helper, we can
use a struct to share between the object and the Impl. This also
gives the Impl access to the maxEnabledAttrib, and saves some
duplicated storage.

BUG=angleproject:1040
TEST=WebGL CTS, end2end_tests, unittests

Change-Id: I55c91e8a5f3dcae302cab441182320aafd5375ef
Reviewed-on: https://chromium-review.googlesource.com/283930
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/VertexArrayImpl.h b/src/libANGLE/renderer/VertexArrayImpl.h
index 0e25f95..a5e4d1b 100644
--- a/src/libANGLE/renderer/VertexArrayImpl.h
+++ b/src/libANGLE/renderer/VertexArrayImpl.h
@@ -11,7 +11,7 @@
 
 #include "common/angleutils.h"
 #include "libANGLE/Buffer.h"
-#include "libANGLE/VertexAttribute.h"
+#include "libANGLE/VertexArray.h"
 
 namespace rx
 {
@@ -19,12 +19,16 @@
 class VertexArrayImpl : angle::NonCopyable
 {
   public:
+    VertexArrayImpl(const gl::VertexArray::Data &data) : mData(data) { }
     virtual ~VertexArrayImpl() { }
 
     virtual void setElementArrayBuffer(const gl::Buffer *buffer) = 0;
     virtual void setAttribute(size_t idx, const gl::VertexAttribute &attr) = 0;
     virtual void setAttributeDivisor(size_t idx, GLuint divisor) = 0;
     virtual void enableAttribute(size_t idx, bool enabledState) = 0;
+
+  protected:
+    const gl::VertexArray::Data &mData;
 };
 
 }