OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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> |
(...skipping 15 matching lines...) Expand all Loading... |
26 class ContextGroup; | 26 class ContextGroup; |
27 class MockGLES2Decoder : public GLES2Decoder { | 27 class MockGLES2Decoder : public GLES2Decoder { |
28 public: | 28 public: |
29 MockGLES2Decoder(); | 29 MockGLES2Decoder(); |
30 virtual ~MockGLES2Decoder(); | 30 virtual ~MockGLES2Decoder(); |
31 | 31 |
32 MOCK_METHOD6(Initialize, | 32 MOCK_METHOD6(Initialize, |
33 bool(const scoped_refptr<gfx::GLSurface>& surface, | 33 bool(const scoped_refptr<gfx::GLSurface>& surface, |
34 const scoped_refptr<gfx::GLContext>& context, | 34 const scoped_refptr<gfx::GLContext>& context, |
35 const gfx::Size& size, | 35 const gfx::Size& size, |
36 const DisallowedExtensions& disallowed_extensions, | 36 const DisallowedFeatures& disallowed_features, |
37 const char* allowed_extensions, | 37 const char* allowed_extensions, |
38 const std::vector<int32>& attribs)); | 38 const std::vector<int32>& attribs)); |
39 MOCK_METHOD0(Destroy, void()); | 39 MOCK_METHOD0(Destroy, void()); |
40 MOCK_METHOD2(SetParent, bool(GLES2Decoder* parent, uint32 parent_texture_id)); | 40 MOCK_METHOD2(SetParent, bool(GLES2Decoder* parent, uint32 parent_texture_id)); |
41 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); | 41 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); |
42 MOCK_METHOD0(MakeCurrent, bool()); | 42 MOCK_METHOD0(MakeCurrent, bool()); |
43 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); | 43 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); |
44 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); | 44 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); |
45 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); | 45 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); |
46 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); | 46 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); |
47 MOCK_METHOD0(GetContextGroup, ContextGroup*()); | 47 MOCK_METHOD0(GetContextGroup, ContextGroup*()); |
48 MOCK_METHOD1(SetResizeCallback, void(Callback1<gfx::Size>::Type*)); | 48 MOCK_METHOD1(SetResizeCallback, void(Callback1<gfx::Size>::Type*)); |
49 MOCK_METHOD1(SetSwapBuffersCallback, void(Callback0::Type*)); | 49 MOCK_METHOD1(SetSwapBuffersCallback, void(Callback0::Type*)); |
50 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, | 50 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, |
51 unsigned int arg_count, | 51 unsigned int arg_count, |
52 const void* cmd_data)); | 52 const void* cmd_data)); |
53 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, | 53 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, |
54 uint32* service_texture_id)); | 54 uint32* service_texture_id)); |
55 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); | 55 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); |
56 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); | 56 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 58 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace gles2 | 61 } // namespace gles2 |
62 } // namespace gpu | 62 } // namespace gpu |
63 | 63 |
64 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 64 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
OLD | NEW |