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/Context.cpp b/src/libANGLE/Context.cpp
index 699f11c..b21c7ee 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -284,7 +284,7 @@
// Although the spec states VAO state is not initialized until the object is bound,
// we create it immediately. The resulting behaviour is transparent to the application,
// since it's not currently possible to access the state until the object is bound.
- VertexArray *vertexArray = new VertexArray(mRenderer->createVertexArray(), handle, MAX_VERTEX_ATTRIBS);
+ VertexArray *vertexArray = new VertexArray(mRenderer, handle, MAX_VERTEX_ATTRIBS);
mVertexArrayMap[handle] = vertexArray;
return handle;
}
@@ -588,7 +588,7 @@
{
if (!getVertexArray(vertexArray))
{
- VertexArray *vertexArrayObject = new VertexArray(mRenderer->createVertexArray(), vertexArray, MAX_VERTEX_ATTRIBS);
+ VertexArray *vertexArrayObject = new VertexArray(mRenderer, vertexArray, MAX_VERTEX_ATTRIBS);
mVertexArrayMap[vertexArray] = vertexArrayObject;
}