| 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 contains the mock GLES2Decoder class. | 5 // This file contains the mock GLES2Decoder class. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
| 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 | 11 |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 16 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 17 #include "gpu/command_buffer/common/mailbox.h" | 17 #include "gpu/command_buffer/common/mailbox.h" |
| 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 19 #include "gpu/command_buffer/service/shader_translator.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 20 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
| 21 | 22 |
| 22 namespace gl { | 23 namespace gl { |
| 23 class GLContext; | 24 class GLContext; |
| 24 class GLSurface; | 25 class GLSurface; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace gpu { | 28 namespace gpu { |
| 28 class AsyncPixelTransferDelegate; | 29 class AsyncPixelTransferDelegate; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 58 MOCK_METHOD0(GetSavedBackTextureCountForTest, size_t()); | 59 MOCK_METHOD0(GetSavedBackTextureCountForTest, size_t()); |
| 59 MOCK_METHOD0(GetCreatedBackTextureCountForTest, size_t()); | 60 MOCK_METHOD0(GetCreatedBackTextureCountForTest, size_t()); |
| 60 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); | 61 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); |
| 61 MOCK_METHOD0(MakeCurrent, bool()); | 62 MOCK_METHOD0(MakeCurrent, bool()); |
| 62 MOCK_METHOD1(GetServiceIdForTesting, uint32_t(uint32_t client_id)); | 63 MOCK_METHOD1(GetServiceIdForTesting, uint32_t(uint32_t client_id)); |
| 63 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); | 64 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); |
| 64 MOCK_METHOD0(GetGLSurface, gl::GLSurface*()); | 65 MOCK_METHOD0(GetGLSurface, gl::GLSurface*()); |
| 65 MOCK_METHOD0(GetGLContext, gl::GLContext*()); | 66 MOCK_METHOD0(GetGLContext, gl::GLContext*()); |
| 66 MOCK_METHOD0(GetContextGroup, ContextGroup*()); | 67 MOCK_METHOD0(GetContextGroup, ContextGroup*()); |
| 67 MOCK_METHOD0(GetContextState, const ContextState*()); | 68 MOCK_METHOD0(GetContextState, const ContextState*()); |
| 69 MOCK_METHOD1(GetTranslator, |
| 70 scoped_refptr<ShaderTranslatorInterface>(unsigned int type)); |
| 68 MOCK_METHOD0(GetCapabilities, Capabilities()); | 71 MOCK_METHOD0(GetCapabilities, Capabilities()); |
| 69 MOCK_CONST_METHOD0(HasPendingQueries, bool()); | 72 MOCK_CONST_METHOD0(HasPendingQueries, bool()); |
| 70 MOCK_METHOD1(ProcessPendingQueries, void(bool)); | 73 MOCK_METHOD1(ProcessPendingQueries, void(bool)); |
| 71 MOCK_CONST_METHOD0(HasMoreIdleWork, bool()); | 74 MOCK_CONST_METHOD0(HasMoreIdleWork, bool()); |
| 72 MOCK_METHOD0(PerformIdleWork, void()); | 75 MOCK_METHOD0(PerformIdleWork, void()); |
| 73 MOCK_CONST_METHOD0(HasPollingWork, bool()); | 76 MOCK_CONST_METHOD0(HasPollingWork, bool()); |
| 74 MOCK_METHOD0(PerformPollingWork, void()); | 77 MOCK_METHOD0(PerformPollingWork, void()); |
| 75 MOCK_METHOD1(RestoreState, void(const ContextState* prev_state)); | 78 MOCK_METHOD1(RestoreState, void(const ContextState* prev_state)); |
| 76 MOCK_CONST_METHOD0(RestoreActiveTexture, void()); | 79 MOCK_CONST_METHOD0(RestoreActiveTexture, void()); |
| 77 MOCK_CONST_METHOD1( | 80 MOCK_CONST_METHOD1( |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); | 164 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); |
| 162 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); | 165 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); |
| 163 | 166 |
| 164 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 167 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
| 165 }; | 168 }; |
| 166 | 169 |
| 167 } // namespace gles2 | 170 } // namespace gles2 |
| 168 } // namespace gpu | 171 } // namespace gpu |
| 169 | 172 |
| 170 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 173 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
| OLD | NEW |