| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef UI_GL_GL_HELPER_H_ | 5 #ifndef UI_GL_GL_HELPER_H_ |
| 6 #define UI_GL_GL_HELPER_H_ | 6 #define UI_GL_GL_HELPER_H_ |
| 7 | 7 |
| 8 #include "ui/gl/gl_bindings.h" | 8 #include "ui/gl/gl_bindings.h" |
| 9 #include "ui/gl/gl_export.h" | 9 #include "ui/gl/gl_export.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Attaches 2 shaders, links them to a program, and checks for errors. | 27 // Attaches 2 shaders, links them to a program, and checks for errors. |
| 28 // Returns program, 0 on failure. | 28 // Returns program, 0 on failure. |
| 29 static GLuint SetupProgram(GLuint vertex_shader, GLuint fragment_shader); | 29 static GLuint SetupProgram(GLuint vertex_shader, GLuint fragment_shader); |
| 30 | 30 |
| 31 // Sets up a vertex buffer containing 4 vertices that can be used to draw | 31 // Sets up a vertex buffer containing 4 vertices that can be used to draw |
| 32 // a quad as a tri-strip. | 32 // a quad as a tri-strip. |
| 33 static GLuint SetupQuadVertexBuffer(); | 33 static GLuint SetupQuadVertexBuffer(); |
| 34 | 34 |
| 35 // Draws a quad to the currently bound frame buffer. | 35 // Draws a quad to the currently bound frame buffer. |
| 36 static void DrawQuad(GLuint vertex_buffer); | 36 static void DrawQuad(GLuint vertex_buffer); |
| 37 |
| 38 // When using the desktop core profile we have to bind a VAO before |
| 39 // calling glVertexAttribPointer. |
| 40 static bool ShouldTestsUseVAOs(); |
| 37 }; | 41 }; |
| 38 | 42 |
| 39 } // namespace gl | 43 } // namespace gl |
| 40 | 44 |
| 41 #endif // UI_GL_GL_HELPER_H_ | 45 #endif // UI_GL_GL_HELPER_H_ |
| OLD | NEW |