| 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 // This file implements mock GL Interface for unit testing. The interface | 5 // This file implements mock GL Interface for unit testing. The interface |
| 6 // corresponds to the set of functionally distinct GL functions defined in | 6 // corresponds to the set of functionally distinct GL functions defined in |
| 7 // generate_bindings.py, which may originate from either desktop GL or GLES. | 7 // generate_bindings.py, which may originate from either desktop GL or GLES. |
| 8 | 8 |
| 9 #ifndef UI_GL_GL_MOCK_H_ | 9 #ifndef UI_GL_GL_MOCK_H_ |
| 10 #define UI_GL_GL_MOCK_H_ | 10 #define UI_GL_GL_MOCK_H_ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 static void SetGLInterface(MockGLInterface* gl_interface); | 24 static void SetGLInterface(MockGLInterface* gl_interface); |
| 25 | 25 |
| 26 // Find an entry point to the mock GL implementation. | 26 // Find an entry point to the mock GL implementation. |
| 27 static void* GL_BINDING_CALL GetGLProcAddress(const char* name); | 27 static void* GL_BINDING_CALL GetGLProcAddress(const char* name); |
| 28 | 28 |
| 29 // Include the auto-generated parts of this class. We split this because | 29 // Include the auto-generated parts of this class. We split this because |
| 30 // it means we can easily edit the non-auto generated parts right here in | 30 // it means we can easily edit the non-auto generated parts right here in |
| 31 // this file instead of having to edit some template or the code generator. | 31 // this file instead of having to edit some template or the code generator. |
| 32 | 32 |
| 33 // Member functions | 33 // Member functions |
| 34 #include "gl_mock_autogen_egl.h" |
| 34 #include "gl_mock_autogen_gl.h" | 35 #include "gl_mock_autogen_gl.h" |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 static MockGLInterface* interface_; | 38 static MockGLInterface* interface_; |
| 38 | 39 |
| 39 // Static mock functions that invoke the member functions of interface_. | 40 // Static mock functions that invoke the member functions of interface_. |
| 40 #include "gl_bindings_autogen_mock.h" | 41 #include "gl_bindings_autogen_mock.h" |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace gfx | 44 } // namespace gfx |
| 44 | 45 |
| 45 #endif // UI_GL_GL_MOCK_H_ | 46 #endif // UI_GL_GL_MOCK_H_ |
| OLD | NEW |