| 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> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class ContextGroup; | 26 class ContextGroup; |
| 27 class ErrorState; | 27 class ErrorState; |
| 28 class QueryManager; | 28 class QueryManager; |
| 29 struct ContextState; | 29 struct ContextState; |
| 30 | 30 |
| 31 class MockGLES2Decoder : public GLES2Decoder { | 31 class MockGLES2Decoder : public GLES2Decoder { |
| 32 public: | 32 public: |
| 33 MockGLES2Decoder(); | 33 MockGLES2Decoder(); |
| 34 virtual ~MockGLES2Decoder(); | 34 virtual ~MockGLES2Decoder(); |
| 35 | 35 |
| 36 error::Error FakeDoCommands(unsigned int num_commands, |
| 37 const void* buffer, |
| 38 int num_entries, |
| 39 int* entries_processed); |
| 40 |
| 36 MOCK_METHOD6(Initialize, | 41 MOCK_METHOD6(Initialize, |
| 37 bool(const scoped_refptr<gfx::GLSurface>& surface, | 42 bool(const scoped_refptr<gfx::GLSurface>& surface, |
| 38 const scoped_refptr<gfx::GLContext>& context, | 43 const scoped_refptr<gfx::GLContext>& context, |
| 39 bool offscreen, | 44 bool offscreen, |
| 40 const gfx::Size& size, | 45 const gfx::Size& size, |
| 41 const DisallowedFeatures& disallowed_features, | 46 const DisallowedFeatures& disallowed_features, |
| 42 const std::vector<int32>& attribs)); | 47 const std::vector<int32>& attribs)); |
| 43 MOCK_METHOD1(Destroy, void(bool have_context)); | 48 MOCK_METHOD1(Destroy, void(bool have_context)); |
| 44 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); | 49 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); |
| 45 MOCK_METHOD1(ProduceFrontBuffer, void(const Mailbox& mailbox)); | 50 MOCK_METHOD1(ProduceFrontBuffer, void(const Mailbox& mailbox)); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 AsyncPixelTransferDelegate*()); | 84 AsyncPixelTransferDelegate*()); |
| 80 MOCK_METHOD0(GetAsyncPixelTransferManager, | 85 MOCK_METHOD0(GetAsyncPixelTransferManager, |
| 81 AsyncPixelTransferManager*()); | 86 AsyncPixelTransferManager*()); |
| 82 MOCK_METHOD0(ResetAsyncPixelTransferManagerForTest, void()); | 87 MOCK_METHOD0(ResetAsyncPixelTransferManagerForTest, void()); |
| 83 MOCK_METHOD1(SetAsyncPixelTransferManagerForTest, | 88 MOCK_METHOD1(SetAsyncPixelTransferManagerForTest, |
| 84 void(AsyncPixelTransferManager*)); | 89 void(AsyncPixelTransferManager*)); |
| 85 MOCK_METHOD1(SetIgnoreCachedStateForTest, void(bool ignore)); | 90 MOCK_METHOD1(SetIgnoreCachedStateForTest, void(bool ignore)); |
| 86 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, | 91 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, |
| 87 unsigned int arg_count, | 92 unsigned int arg_count, |
| 88 const void* cmd_data)); | 93 const void* cmd_data)); |
| 94 MOCK_METHOD4(DoCommands, |
| 95 error::Error(unsigned int num_commands, |
| 96 const void* buffer, |
| 97 int num_entries, |
| 98 int* entries_processed)); |
| 89 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, | 99 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, |
| 90 uint32* service_texture_id)); | 100 uint32* service_texture_id)); |
| 91 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); | 101 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); |
| 92 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); | 102 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); |
| 93 MOCK_METHOD10(ClearLevel, bool( | 103 MOCK_METHOD10(ClearLevel, bool( |
| 94 unsigned service_id, | 104 unsigned service_id, |
| 95 unsigned bind_target, | 105 unsigned bind_target, |
| 96 unsigned target, | 106 unsigned target, |
| 97 int level, | 107 int level, |
| 98 unsigned internal_format, | 108 unsigned internal_format, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 118 MOCK_METHOD0(WasContextLostByRobustnessExtension, bool()); | 128 MOCK_METHOD0(WasContextLostByRobustnessExtension, bool()); |
| 119 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); | 129 MOCK_METHOD1(LoseContext, void(uint32 reset_status)); |
| 120 | 130 |
| 121 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 131 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
| 122 }; | 132 }; |
| 123 | 133 |
| 124 } // namespace gles2 | 134 } // namespace gles2 |
| 125 } // namespace gpu | 135 } // namespace gpu |
| 126 | 136 |
| 127 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 137 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
| OLD | NEW |