Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_mock.h

Issue 2275203002: Make command buffer commands and immediate data volatile (Closed)
Patch Set: std::copy->const_cast+memcpy Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 23 matching lines...) Expand all
34 class ErrorState; 34 class ErrorState;
35 class QueryManager; 35 class QueryManager;
36 struct ContextState; 36 struct ContextState;
37 37
38 class MockGLES2Decoder : public GLES2Decoder { 38 class MockGLES2Decoder : public GLES2Decoder {
39 public: 39 public:
40 MockGLES2Decoder(); 40 MockGLES2Decoder();
41 virtual ~MockGLES2Decoder(); 41 virtual ~MockGLES2Decoder();
42 42
43 error::Error FakeDoCommands(unsigned int num_commands, 43 error::Error FakeDoCommands(unsigned int num_commands,
44 const void* buffer, 44 const volatile void* buffer,
45 int num_entries, 45 int num_entries,
46 int* entries_processed); 46 int* entries_processed);
47 47
48 MOCK_METHOD5(Initialize, 48 MOCK_METHOD5(Initialize,
49 bool(const scoped_refptr<gl::GLSurface>& surface, 49 bool(const scoped_refptr<gl::GLSurface>& surface,
50 const scoped_refptr<gl::GLContext>& context, 50 const scoped_refptr<gl::GLContext>& context,
51 bool offscreen, 51 bool offscreen,
52 const DisallowedFeatures& disallowed_features, 52 const DisallowedFeatures& disallowed_features,
53 const ContextCreationAttribHelper& attrib_helper)); 53 const ContextCreationAttribHelper& attrib_helper));
54 MOCK_METHOD1(Destroy, void(bool have_context)); 54 MOCK_METHOD1(Destroy, void(bool have_context));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 MOCK_METHOD0(GetQueryManager, gpu::gles2::QueryManager*()); 95 MOCK_METHOD0(GetQueryManager, gpu::gles2::QueryManager*());
96 MOCK_METHOD0( 96 MOCK_METHOD0(
97 GetTransformFeedbackManager, gpu::gles2::TransformFeedbackManager*()); 97 GetTransformFeedbackManager, gpu::gles2::TransformFeedbackManager*());
98 MOCK_METHOD0(GetVertexArrayManager, gpu::gles2::VertexArrayManager*()); 98 MOCK_METHOD0(GetVertexArrayManager, gpu::gles2::VertexArrayManager*());
99 MOCK_METHOD0(GetImageManager, gpu::gles2::ImageManager*()); 99 MOCK_METHOD0(GetImageManager, gpu::gles2::ImageManager*());
100 MOCK_METHOD1( 100 MOCK_METHOD1(
101 SetResizeCallback, void(const base::Callback<void(gfx::Size, float)>&)); 101 SetResizeCallback, void(const base::Callback<void(gfx::Size, float)>&));
102 MOCK_METHOD1(SetIgnoreCachedStateForTest, void(bool ignore)); 102 MOCK_METHOD1(SetIgnoreCachedStateForTest, void(bool ignore));
103 MOCK_METHOD1(SetForceShaderNameHashingForTest, void(bool force)); 103 MOCK_METHOD1(SetForceShaderNameHashingForTest, void(bool force));
104 MOCK_METHOD1(SetAllowExit, void(bool allow)); 104 MOCK_METHOD1(SetAllowExit, void(bool allow));
105 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, 105 MOCK_METHOD3(DoCommand,
106 unsigned int arg_count, 106 error::Error(unsigned int command,
107 const void* cmd_data)); 107 unsigned int arg_count,
108 const volatile void* cmd_data));
108 MOCK_METHOD4(DoCommands, 109 MOCK_METHOD4(DoCommands,
109 error::Error(unsigned int num_commands, 110 error::Error(unsigned int num_commands,
110 const void* buffer, 111 const volatile void* buffer,
111 int num_entries, 112 int num_entries,
112 int* entries_processed)); 113 int* entries_processed));
113 MOCK_METHOD2(GetServiceTextureId, 114 MOCK_METHOD2(GetServiceTextureId,
114 bool(uint32_t client_texture_id, uint32_t* service_texture_id)); 115 bool(uint32_t client_texture_id, uint32_t* service_texture_id));
115 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); 116 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason());
116 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); 117 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id));
117 MOCK_METHOD9(ClearLevel, 118 MOCK_METHOD9(ClearLevel,
118 bool(Texture* texture, 119 bool(Texture* texture,
119 unsigned target, 120 unsigned target,
120 int level, 121 int level,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); 166 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool());
166 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); 167 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason));
167 168
168 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); 169 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder);
169 }; 170 };
170 171
171 } // namespace gles2 172 } // namespace gles2
172 } // namespace gpu 173 } // namespace gpu
173 174
174 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 175 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698