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 <vector> | 10 #include <vector> |
11 | 11 |
12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 class GLContext; | 18 class GLContext; |
19 class GLSurface; | 19 class GLSurface; |
20 } | 20 } |
21 | 21 |
22 namespace gpu { | 22 namespace gpu { |
23 class StreamTextureManager; | 23 class StreamTextureManager; |
24 | 24 |
25 namespace gles2 { | 25 namespace gles2 { |
26 | 26 |
27 class ContextGroup; | 27 class ContextGroup; |
| 28 class ErrorState; |
28 class QueryManager; | 29 class QueryManager; |
29 | 30 |
30 class MockGLES2Decoder : public GLES2Decoder { | 31 class MockGLES2Decoder : public GLES2Decoder { |
31 public: | 32 public: |
32 MockGLES2Decoder(); | 33 MockGLES2Decoder(); |
33 virtual ~MockGLES2Decoder(); | 34 virtual ~MockGLES2Decoder(); |
34 | 35 |
35 MOCK_METHOD7(Initialize, | 36 MOCK_METHOD7(Initialize, |
36 bool(const scoped_refptr<gfx::GLSurface>& surface, | 37 bool(const scoped_refptr<gfx::GLSurface>& surface, |
37 const scoped_refptr<gfx::GLContext>& context, | 38 const scoped_refptr<gfx::GLContext>& context, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 MOCK_METHOD9(ClearLevel, bool( | 83 MOCK_METHOD9(ClearLevel, bool( |
83 unsigned service_id, | 84 unsigned service_id, |
84 unsigned bind_target, | 85 unsigned bind_target, |
85 unsigned target, | 86 unsigned target, |
86 int level, | 87 int level, |
87 unsigned format, | 88 unsigned format, |
88 unsigned type, | 89 unsigned type, |
89 int width, | 90 int width, |
90 int height, | 91 int height, |
91 bool is_texture_immutable)); | 92 bool is_texture_immutable)); |
92 MOCK_METHOD0(GetGLError, uint32()); | 93 MOCK_METHOD0(GetErrorState, ErrorState *()); |
93 MOCK_METHOD5(SetGLError, void( | |
94 const char* filename, int line, | |
95 unsigned error, const char* function_name, const char* msg)); | |
96 MOCK_METHOD5(SetGLErrorInvalidEnum, void( | |
97 const char* filename, int line, | |
98 const char* function_name, unsigned value, const char* label)); | |
99 MOCK_METHOD6(SetGLErrorInvalidParam, void( | |
100 const char* filename, | |
101 int line, | |
102 unsigned error, | |
103 const char* function_name, | |
104 unsigned pname, | |
105 int param)); | |
106 MOCK_METHOD3(PeekGLError, unsigned( | |
107 const char* file, int line, const char* filename)); | |
108 MOCK_METHOD3(CopyRealGLErrorsToWrapper, void( | |
109 const char* file, int line, const char* filename)); | |
110 MOCK_METHOD3(ClearRealGLErrors, void( | |
111 const char* file, int line, const char* filename)); | |
112 | 94 |
113 MOCK_METHOD0(GetLogger, Logger*()); | 95 MOCK_METHOD0(GetLogger, Logger*()); |
114 MOCK_METHOD1(SetShaderCacheCallback, | 96 MOCK_METHOD1(SetShaderCacheCallback, |
115 void(const ShaderCacheCallback& callback)); | 97 void(const ShaderCacheCallback& callback)); |
116 MOCK_METHOD1(SetWaitSyncPointCallback, | 98 MOCK_METHOD1(SetWaitSyncPointCallback, |
117 void(const WaitSyncPointCallback& callback)); | 99 void(const WaitSyncPointCallback& callback)); |
118 MOCK_METHOD0(GetTextureUploadCount, uint32()); | 100 MOCK_METHOD0(GetTextureUploadCount, uint32()); |
119 MOCK_METHOD0(GetTotalTextureUploadTime, base::TimeDelta()); | 101 MOCK_METHOD0(GetTotalTextureUploadTime, base::TimeDelta()); |
120 MOCK_METHOD0(GetTotalProcessingCommandsTime, base::TimeDelta()); | 102 MOCK_METHOD0(GetTotalProcessingCommandsTime, base::TimeDelta()); |
121 MOCK_METHOD1(AddProcessingCommandsTime, void(base::TimeDelta)); | 103 MOCK_METHOD1(AddProcessingCommandsTime, void(base::TimeDelta)); |
122 MOCK_METHOD0(WasContextLost, bool()); | 104 MOCK_METHOD0(WasContextLost, bool()); |
123 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); | 105 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); |
124 | 106 |
125 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 107 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
126 }; | 108 }; |
127 | 109 |
128 } // namespace gles2 | 110 } // namespace gles2 |
129 } // namespace gpu | 111 } // namespace gpu |
130 | 112 |
131 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 113 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
OLD | NEW |