| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 is auto-generated from | 5 // This file is auto-generated from |
| 6 // ui/gl/generate_bindings.py | 6 // ui/gl/generate_bindings.py |
| 7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| 11 #include <string.h> | 11 #include <string.h> |
| 12 | 12 |
| 13 #include "ui/gl/gl_mock.h" | 13 #include "ui/gl/gl_mock.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 | 16 |
| 17 // This is called mainly to prevent the compiler combining the code of mock | 17 // This is called mainly to prevent the compiler combining the code of mock |
| 18 // functions with identical contents, so that their function pointers will be | 18 // functions with identical contents, so that their function pointers will be |
| 19 // different. | 19 // different. |
| 20 void MakeFunctionUnique(const char* func_name) { | 20 void MakeFunctionUnique(const char* func_name) { |
| 21 VLOG(2) << "Calling mock " << func_name; | 21 VLOG(2) << "Calling mock " << func_name; |
| 22 } | 22 } |
| 23 | 23 |
| 24 void GL_BINDING_CALL MockGLInterface::Mock_glActiveTexture(GLenum texture) { | 24 void GL_BINDING_CALL MockGLInterface::Mock_glActiveTexture(GLenum texture) { |
| 25 MakeFunctionUnique("glActiveTexture"); | 25 MakeFunctionUnique("glActiveTexture"); |
| 26 interface_->ActiveTexture(texture); | 26 interface_->ActiveTexture(texture); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void GL_BINDING_CALL |
| 30 MockGLInterface::Mock_glApplyFramebufferAttachmentCMAAINTEL(void) { |
| 31 MakeFunctionUnique("glApplyFramebufferAttachmentCMAAINTEL"); |
| 32 interface_->ApplyFramebufferAttachmentCMAAINTEL(); |
| 33 } |
| 34 |
| 29 void GL_BINDING_CALL MockGLInterface::Mock_glAttachShader(GLuint program, | 35 void GL_BINDING_CALL MockGLInterface::Mock_glAttachShader(GLuint program, |
| 30 GLuint shader) { | 36 GLuint shader) { |
| 31 MakeFunctionUnique("glAttachShader"); | 37 MakeFunctionUnique("glAttachShader"); |
| 32 interface_->AttachShader(program, shader); | 38 interface_->AttachShader(program, shader); |
| 33 } | 39 } |
| 34 | 40 |
| 35 void GL_BINDING_CALL MockGLInterface::Mock_glBeginQuery(GLenum target, | 41 void GL_BINDING_CALL MockGLInterface::Mock_glBeginQuery(GLenum target, |
| 36 GLuint id) { | 42 GLuint id) { |
| 37 MakeFunctionUnique("glBeginQuery"); | 43 MakeFunctionUnique("glBeginQuery"); |
| 38 interface_->BeginQuery(target, id); | 44 interface_->BeginQuery(target, id); |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 return interface_->WaitSync(sync, flags, timeout); | 2690 return interface_->WaitSync(sync, flags, timeout); |
| 2685 } | 2691 } |
| 2686 | 2692 |
| 2687 static void MockInvalidFunction() { | 2693 static void MockInvalidFunction() { |
| 2688 NOTREACHED(); | 2694 NOTREACHED(); |
| 2689 } | 2695 } |
| 2690 | 2696 |
| 2691 void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) { | 2697 void* GL_BINDING_CALL MockGLInterface::GetGLProcAddress(const char* name) { |
| 2692 if (strcmp(name, "glActiveTexture") == 0) | 2698 if (strcmp(name, "glActiveTexture") == 0) |
| 2693 return reinterpret_cast<void*>(Mock_glActiveTexture); | 2699 return reinterpret_cast<void*>(Mock_glActiveTexture); |
| 2700 if (strcmp(name, "glApplyFramebufferAttachmentCMAAINTEL") == 0) |
| 2701 return reinterpret_cast<void*>(Mock_glApplyFramebufferAttachmentCMAAINTEL); |
| 2694 if (strcmp(name, "glAttachShader") == 0) | 2702 if (strcmp(name, "glAttachShader") == 0) |
| 2695 return reinterpret_cast<void*>(Mock_glAttachShader); | 2703 return reinterpret_cast<void*>(Mock_glAttachShader); |
| 2696 if (strcmp(name, "glBeginQuery") == 0) | 2704 if (strcmp(name, "glBeginQuery") == 0) |
| 2697 return reinterpret_cast<void*>(Mock_glBeginQuery); | 2705 return reinterpret_cast<void*>(Mock_glBeginQuery); |
| 2698 if (strcmp(name, "glBeginQueryARB") == 0) | 2706 if (strcmp(name, "glBeginQueryARB") == 0) |
| 2699 return reinterpret_cast<void*>(Mock_glBeginQueryARB); | 2707 return reinterpret_cast<void*>(Mock_glBeginQueryARB); |
| 2700 if (strcmp(name, "glBeginQueryEXT") == 0) | 2708 if (strcmp(name, "glBeginQueryEXT") == 0) |
| 2701 return reinterpret_cast<void*>(Mock_glBeginQueryEXT); | 2709 return reinterpret_cast<void*>(Mock_glBeginQueryEXT); |
| 2702 if (strcmp(name, "glBeginTransformFeedback") == 0) | 2710 if (strcmp(name, "glBeginTransformFeedback") == 0) |
| 2703 return reinterpret_cast<void*>(Mock_glBeginTransformFeedback); | 2711 return reinterpret_cast<void*>(Mock_glBeginTransformFeedback); |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3407 if (strcmp(name, "glVertexAttribPointer") == 0) | 3415 if (strcmp(name, "glVertexAttribPointer") == 0) |
| 3408 return reinterpret_cast<void*>(Mock_glVertexAttribPointer); | 3416 return reinterpret_cast<void*>(Mock_glVertexAttribPointer); |
| 3409 if (strcmp(name, "glViewport") == 0) | 3417 if (strcmp(name, "glViewport") == 0) |
| 3410 return reinterpret_cast<void*>(Mock_glViewport); | 3418 return reinterpret_cast<void*>(Mock_glViewport); |
| 3411 if (strcmp(name, "glWaitSync") == 0) | 3419 if (strcmp(name, "glWaitSync") == 0) |
| 3412 return reinterpret_cast<void*>(Mock_glWaitSync); | 3420 return reinterpret_cast<void*>(Mock_glWaitSync); |
| 3413 return reinterpret_cast<void*>(&MockInvalidFunction); | 3421 return reinterpret_cast<void*>(&MockInvalidFunction); |
| 3414 } | 3422 } |
| 3415 | 3423 |
| 3416 } // namespace gfx | 3424 } // namespace gfx |
| OLD | NEW |