Apply clang-format to many files.
This cleans up the formatting in many places.
BUG=None
Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384
Reviewed-on: https://chromium-review.googlesource.com/487884
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/LineLoopTest.cpp b/src/tests/gl_tests/LineLoopTest.cpp
index 6d5a440..91fe88b 100644
--- a/src/tests/gl_tests/LineLoopTest.cpp
+++ b/src/tests/gl_tests/LineLoopTest.cpp
@@ -25,24 +25,12 @@
{
ANGLETest::SetUp();
- const std::string vsSource = SHADER_SOURCE
- (
- attribute highp vec4 position;
+ const std::string vsSource = SHADER_SOURCE(attribute highp vec4 position;
- void main(void)
- {
- gl_Position = position;
- }
- );
+ void main(void) { gl_Position = position; });
- const std::string fsSource = SHADER_SOURCE
- (
- uniform highp vec4 color;
- void main(void)
- {
- gl_FragColor = color;
- }
- );
+ const std::string fsSource =
+ SHADER_SOURCE(uniform highp vec4 color; void main(void) { gl_FragColor = color; });
mProgram = CompileProgram(vsSource, fsSource);
if (mProgram == 0)
@@ -51,7 +39,7 @@
}
mPositionLocation = glGetAttribLocation(mProgram, "position");
- mColorLocation = glGetUniformLocation(mProgram, "color");
+ mColorLocation = glGetUniformLocation(mProgram, "color");
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND);
@@ -71,31 +59,13 @@
{
glClear(GL_COLOR_BUFFER_BIT);
- static const GLfloat loopPositions[] =
- {
- 0.0f, 0.0f,
- 0.0f, 0.0f,
- 0.0f, 0.0f,
- 0.0f, 0.0f,
- 0.0f, 0.0f,
- 0.0f, 0.0f,
- -0.5f, -0.5f,
- -0.5f, 0.5f,
- 0.5f, 0.5f,
- 0.5f, -0.5f
- };
+ static const GLfloat loopPositions[] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, -0.5f,
+ -0.5f, 0.5f, 0.5f, 0.5f, 0.5f, -0.5f};
- static const GLfloat stripPositions[] =
- {
- -0.5f, -0.5f,
- -0.5f, 0.5f,
- 0.5f, 0.5f,
- 0.5f, -0.5f
- };
- static const GLubyte stripIndices[] =
- {
- 1, 0, 3, 2, 1
- };
+ static const GLfloat stripPositions[] = {-0.5f, -0.5f, -0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f, -0.5f};
+ static const GLubyte stripIndices[] = {1, 0, 3, 2, 1};
glUseProgram(mProgram);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuffer);
@@ -110,7 +80,8 @@
glDrawElements(GL_LINE_STRIP, 5, GL_UNSIGNED_BYTE, stripIndices);
std::vector<GLubyte> pixels(getWindowWidth() * getWindowHeight() * 4);
- glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]);
+ glReadPixels(0, 0, getWindowWidth(), getWindowHeight(), GL_RGBA, GL_UNSIGNED_BYTE,
+ &pixels[0]);
ASSERT_GL_NO_ERROR();
@@ -118,7 +89,7 @@
{
for (int x = 0; x < getWindowWidth(); x++)
{
- const GLubyte* pixel = &pixels[0] + ((y * getWindowWidth() + x) * 4);
+ const GLubyte *pixel = &pixels[0] + ((y * getWindowWidth() + x) * 4);
EXPECT_EQ(pixel[0], 0);
EXPECT_EQ(pixel[1], pixel[2]);
@@ -139,7 +110,7 @@
// This doesn't occur on Windows 10 (Version 1511) though.
ignoreD3D11SDKLayersWarnings();
- static const GLubyte indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLubyte indices[] = {0, 7, 6, 9, 8, 0};
runTest(GL_UNSIGNED_BYTE, 0, indices + 1);
}
@@ -148,7 +119,7 @@
// Disable D3D11 SDK Layers warnings checks, see ANGLE issue 667 for details
ignoreD3D11SDKLayersWarnings();
- static const GLushort indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLushort indices[] = {0, 7, 6, 9, 8, 0};
runTest(GL_UNSIGNED_SHORT, 0, indices + 1);
}
@@ -162,7 +133,7 @@
// Disable D3D11 SDK Layers warnings checks, see ANGLE issue 667 for details
ignoreD3D11SDKLayersWarnings();
- static const GLuint indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLuint indices[] = {0, 7, 6, 9, 8, 0};
runTest(GL_UNSIGNED_INT, 0, indices + 1);
}
@@ -171,7 +142,7 @@
// Disable D3D11 SDK Layers warnings checks, see ANGLE issue 667 for details
ignoreD3D11SDKLayersWarnings();
- static const GLubyte indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLubyte indices[] = {0, 7, 6, 9, 8, 0};
GLuint buf;
glGenBuffers(1, &buf);
@@ -188,7 +159,7 @@
// Disable D3D11 SDK Layers warnings checks, see ANGLE issue 667 for details
ignoreD3D11SDKLayersWarnings();
- static const GLushort indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLushort indices[] = {0, 7, 6, 9, 8, 0};
GLuint buf;
glGenBuffers(1, &buf);
@@ -210,7 +181,7 @@
// Disable D3D11 SDK Layers warnings checks, see ANGLE issue 667 for details
ignoreD3D11SDKLayersWarnings();
- static const GLuint indices[] = { 0, 7, 6, 9, 8, 0 };
+ static const GLuint indices[] = {0, 7, 6, 9, 8, 0};
GLuint buf;
glGenBuffers(1, &buf);
@@ -222,5 +193,6 @@
glDeleteBuffers(1, &buf);
}
-// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
+// Use this to select which configurations (e.g. which renderer, which GLES major version) these
+// tests should be run against.
ANGLE_INSTANTIATE_TEST(LineLoopTest, ES2_D3D9(), ES2_D3D11(), ES2_OPENGL(), ES2_OPENGLES());