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

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

Issue 10535073: Enforce compressed texture restrictions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 CommonDecoder(); 96 CommonDecoder();
97 virtual ~CommonDecoder(); 97 virtual ~CommonDecoder();
98 98
99 // Sets the engine, to get shared memory buffers from, and to set the token 99 // Sets the engine, to get shared memory buffers from, and to set the token
100 // to. 100 // to.
101 void set_engine(CommandBufferEngine* engine) { 101 void set_engine(CommandBufferEngine* engine) {
102 engine_ = engine; 102 engine_ = engine;
103 } 103 }
104 104
105 // Creates a bucket. If the bucket already exists returns that bucket.
106 Bucket* CreateBucket(uint32 bucket_id);
107
105 // Gets a bucket. Returns NULL if the bucket does not exist. 108 // Gets a bucket. Returns NULL if the bucket does not exist.
106 Bucket* GetBucket(uint32 bucket_id) const; 109 Bucket* GetBucket(uint32 bucket_id) const;
107 110
108 // Gets the address of shared memory data, given a shared memory ID and an 111 // Gets the address of shared memory data, given a shared memory ID and an
109 // offset. Also checks that the size is consistent with the shared memory 112 // offset. Also checks that the size is consistent with the shared memory
110 // size. 113 // size.
111 // Parameters: 114 // Parameters:
112 // shm_id: the id of the shared memory buffer. 115 // shm_id: the id of the shared memory buffer.
113 // offset: the offset of the data in the shared memory buffer. 116 // offset: the offset of the data in the shared memory buffer.
114 // size: the size of the data. 117 // size: the size of the data.
(...skipping 21 matching lines...) Expand all
136 // error::kNoError if no error was found, one of 139 // error::kNoError if no error was found, one of
137 // error::Error otherwise. 140 // error::Error otherwise.
138 error::Error DoCommonCommand( 141 error::Error DoCommonCommand(
139 unsigned int command, 142 unsigned int command,
140 unsigned int arg_count, 143 unsigned int arg_count,
141 const void* cmd_data); 144 const void* cmd_data);
142 145
143 // Gets an name for a common command. 146 // Gets an name for a common command.
144 const char* GetCommonCommandName(cmd::CommandId command_id) const; 147 const char* GetCommonCommandName(cmd::CommandId command_id) const;
145 148
146 // Creates a bucket. If the bucket already exists returns that bucket.
147 Bucket* CreateBucket(uint32 bucket_id);
148
149 private: 149 private:
150 // Generate a member function prototype for each command in an automated and 150 // Generate a member function prototype for each command in an automated and
151 // typesafe way. 151 // typesafe way.
152 #define COMMON_COMMAND_BUFFER_CMD_OP(name) \ 152 #define COMMON_COMMAND_BUFFER_CMD_OP(name) \
153 error::Error Handle##name( \ 153 error::Error Handle##name( \
154 uint32 immediate_data_size, \ 154 uint32 immediate_data_size, \
155 const cmd::name& args); \ 155 const cmd::name& args); \
156 156
157 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP) 157 COMMON_COMMAND_BUFFER_CMDS(COMMON_COMMAND_BUFFER_CMD_OP)
158 158
(...skipping 15 matching lines...) Expand all
174 174
175 uint32 offset; 175 uint32 offset;
176 }; 176 };
177 std::stack<CommandAddress> call_stack_; 177 std::stack<CommandAddress> call_stack_;
178 }; 178 };
179 179
180 } // namespace gpu 180 } // namespace gpu
181 181
182 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ 182 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_
183 183
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698