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/common/mailbox.h" |
12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
13 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
16 | 17 |
17 namespace gfx { | 18 namespace gfx { |
18 class GLContext; | 19 class GLContext; |
19 class GLSurface; | 20 class GLSurface; |
20 } | 21 } |
21 | 22 |
(...skipping 14 matching lines...) Expand all Loading... |
36 MOCK_METHOD7(Initialize, | 37 MOCK_METHOD7(Initialize, |
37 bool(const scoped_refptr<gfx::GLSurface>& surface, | 38 bool(const scoped_refptr<gfx::GLSurface>& surface, |
38 const scoped_refptr<gfx::GLContext>& context, | 39 const scoped_refptr<gfx::GLContext>& context, |
39 bool offscreen, | 40 bool offscreen, |
40 const gfx::Size& size, | 41 const gfx::Size& size, |
41 const DisallowedFeatures& disallowed_features, | 42 const DisallowedFeatures& disallowed_features, |
42 const char* allowed_extensions, | 43 const char* allowed_extensions, |
43 const std::vector<int32>& attribs)); | 44 const std::vector<int32>& attribs)); |
44 MOCK_METHOD1(Destroy, void(bool have_context)); | 45 MOCK_METHOD1(Destroy, void(bool have_context)); |
45 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); | 46 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); |
46 MOCK_METHOD2(SetParent, bool(GLES2Decoder* parent, uint32 parent_texture_id)); | 47 MOCK_METHOD1(ProduceFrontBuffer, bool(const Mailbox& mailbox)); |
47 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); | 48 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); |
48 MOCK_METHOD0(MakeCurrent, bool()); | 49 MOCK_METHOD0(MakeCurrent, bool()); |
49 MOCK_METHOD0(ReleaseCurrent, void()); | 50 MOCK_METHOD0(ReleaseCurrent, void()); |
50 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); | 51 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); |
51 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); | 52 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); |
52 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); | 53 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); |
53 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); | 54 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); |
54 MOCK_METHOD0(GetContextGroup, ContextGroup*()); | 55 MOCK_METHOD0(GetContextGroup, ContextGroup*()); |
55 MOCK_METHOD0(ProcessPendingQueries, bool()); | 56 MOCK_METHOD0(ProcessPendingQueries, bool()); |
56 MOCK_METHOD0(HasMoreIdleWork, bool()); | 57 MOCK_METHOD0(HasMoreIdleWork, bool()); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 MOCK_METHOD0(WasContextLost, bool()); | 110 MOCK_METHOD0(WasContextLost, bool()); |
110 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); | 111 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 113 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace gles2 | 116 } // namespace gles2 |
116 } // namespace gpu | 117 } // namespace gpu |
117 | 118 |
118 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 119 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
OLD | NEW |