| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Helper functions for GL. | 5 // Helper functions for GL. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ | 7 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ |
| 8 #define GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ | 8 #define GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const char* vertex_shader_source, | 29 const char* vertex_shader_source, |
| 30 const char* fragment_shader_source); | 30 const char* fragment_shader_source); |
| 31 | 31 |
| 32 // Make a unit quad with position only. | 32 // Make a unit quad with position only. |
| 33 // Returns the created buffer. | 33 // Returns the created buffer. |
| 34 static GLuint SetupUnitQuad(GLint position_location); | 34 static GLuint SetupUnitQuad(GLint position_location); |
| 35 | 35 |
| 36 // Checks an area of pixels for a color. | 36 // Checks an area of pixels for a color. |
| 37 static bool CheckPixels( | 37 static bool CheckPixels( |
| 38 GLint x, GLint y, GLsizei width, GLsizei height, GLint tolerance, | 38 GLint x, GLint y, GLsizei width, GLsizei height, GLint tolerance, |
| 39 uint8* color); | 39 const uint8* color); |
| 40 | 40 |
| 41 // Uses ReadPixels to save an area of the current FBO/Backbuffer. | 41 // Uses ReadPixels to save an area of the current FBO/Backbuffer. |
| 42 static bool SaveBackbufferAsBMP(const char* filename, int width, int height); | 42 static bool SaveBackbufferAsBMP(const char* filename, int width, int height); |
| 43 | 43 |
| 44 // Run unit tests. | 44 // Run unit tests. |
| 45 static int RunTests(int argc, char** argv); | 45 static int RunTests(int argc, char** argv); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 #endif // GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ | 48 #endif // GPU_COMMAND_BUFFER_TESTS_GL_TEST_UTILS_H_ |
| OLD | NEW |