Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: gpu/command_buffer/tests/gl_test_utils.cc

Issue 2410023002: Revert of Add gl tests to make sure when a buffer is unmapped, all access path generates an ... (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60d073383140a138adc869dc6f017a785e2eb5eb..b68320fc59572874f73cc43cf3da68e12f0d83c0 100644
--- a/gpu/command_buffer/tests/gl_test_utils.cc
+++ b/gpu/command_buffer/tests/gl_test_utils.cc
@@ -161,29 +161,19 @@
GLuint vbo = 0;
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
- 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,
+ 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,
};
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(position_location);
glVertexAttribPointer(position_location, 2, GL_FLOAT, GL_FALSE, 0, 0);
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(
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698