| 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 #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 Loading... |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 CommonDecoder(); | 97 CommonDecoder(); |
| 98 virtual ~CommonDecoder(); | 98 virtual ~CommonDecoder(); |
| 99 | 99 |
| 100 // Sets the engine, to get shared memory buffers from, and to set the token | 100 // Sets the engine, to get shared memory buffers from, and to set the token |
| 101 // to. | 101 // to. |
| 102 void set_engine(CommandBufferEngine* engine) { | 102 void set_engine(CommandBufferEngine* engine) { |
| 103 engine_ = engine; | 103 engine_ = engine; |
| 104 } | 104 } |
| 105 CommandBufferEngine* engine() const { return engine_; } |
| 105 | 106 |
| 106 // Creates a bucket. If the bucket already exists returns that bucket. | 107 // Creates a bucket. If the bucket already exists returns that bucket. |
| 107 Bucket* CreateBucket(uint32 bucket_id); | 108 Bucket* CreateBucket(uint32 bucket_id); |
| 108 | 109 |
| 109 // Gets a bucket. Returns NULL if the bucket does not exist. | 110 // Gets a bucket. Returns NULL if the bucket does not exist. |
| 110 Bucket* GetBucket(uint32 bucket_id) const; | 111 Bucket* GetBucket(uint32 bucket_id) const; |
| 111 | 112 |
| 112 // Gets the address of shared memory data, given a shared memory ID and an | 113 // Gets the address of shared memory data, given a shared memory ID and an |
| 113 // offset. Also checks that the size is consistent with the shared memory | 114 // offset. Also checks that the size is consistent with the shared memory |
| 114 // size. | 115 // size. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 179 |
| 179 uint32 offset; | 180 uint32 offset; |
| 180 }; | 181 }; |
| 181 std::stack<CommandAddress> call_stack_; | 182 std::stack<CommandAddress> call_stack_; |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace gpu | 185 } // namespace gpu |
| 185 | 186 |
| 186 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ | 187 #endif // GPU_COMMAND_BUFFER_SERVICE_COMMON_DECODER_H_ |
| 187 | 188 |
| OLD | NEW |