| Index: gpu/command_buffer/tests/gl_test_utils.cc
|
| diff --git a/gpu/command_buffer/tests/gl_test_utils.cc b/gpu/command_buffer/tests/gl_test_utils.cc
|
| index b68320fc59572874f73cc43cf3da68e12f0d83c0..60d073383140a138adc869dc6f017a785e2eb5eb 100644
|
| --- a/gpu/command_buffer/tests/gl_test_utils.cc
|
| +++ b/gpu/command_buffer/tests/gl_test_utils.cc
|
| @@ -161,13 +161,9 @@ GLuint GLTestHelper::SetupUnitQuad(GLint position_location) {
|
| GLuint vbo = 0;
|
| glGenBuffers(1, &vbo);
|
| glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
| - static float vertices[] = {
|
| - 1.0f, 1.0f,
|
| - -1.0f, 1.0f,
|
| - -1.0f, -1.0f,
|
| - 1.0f, 1.0f,
|
| - -1.0f, -1.0f,
|
| - 1.0f, -1.0f,
|
| + static const float vertices[] = {
|
| + 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
|
| + 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f,
|
| };
|
| glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
|
| glEnableVertexAttribArray(position_location);
|
| @@ -176,6 +172,20 @@ GLuint GLTestHelper::SetupUnitQuad(GLint position_location) {
|
| return vbo;
|
| }
|
|
|
| +std::vector<GLuint> GLTestHelper::SetupIndexedUnitQuad(
|
| + GLint position_location) {
|
| + GLuint array_buffer = SetupUnitQuad(position_location);
|
| + static const uint8_t indices[] = {0, 1, 2, 3, 4, 5};
|
| + GLuint index_buffer = 0;
|
| + glGenBuffers(1, &index_buffer);
|
| + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer);
|
| + glBufferData(GL_ELEMENT_ARRAY_BUFFER, 6, indices, GL_STATIC_DRAW);
|
| + std::vector<GLuint> buffers(2);
|
| + buffers[0] = array_buffer;
|
| + buffers[1] = index_buffer;
|
| + return buffers;
|
| +}
|
| +
|
| GLuint GLTestHelper::SetupColorsForUnitQuad(
|
| GLint location, const GLfloat color[4], GLenum usage) {
|
| GLuint vbo = 0;
|
|
|