OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 16 matching lines...) Expand all Loading... |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 | 32 |
33 // This file contains the implementation of the command buffer helper class. | 33 // This file contains the implementation of the command buffer helper class. |
34 | 34 |
35 #include "gpu/command_buffer/client/cmd_buffer_helper.h" | 35 #include "gpu/command_buffer/client/cmd_buffer_helper.h" |
36 #include "gpu/command_buffer/common/command_buffer.h" | 36 #include "gpu/command_buffer/common/command_buffer.h" |
37 #include "gpu/np_utils/np_utils.h" | |
38 | 37 |
39 namespace command_buffer { | 38 namespace command_buffer { |
40 | 39 |
41 using command_buffer::CommandBuffer; | 40 using command_buffer::CommandBuffer; |
42 using np_utils::NPBrowser; | |
43 using np_utils::NPInvoke; | |
44 using np_utils::NPObjectPointer; | |
45 | 41 |
46 CommandBufferHelper::CommandBufferHelper(CommandBuffer* command_buffer) | 42 CommandBufferHelper::CommandBufferHelper(CommandBuffer* command_buffer) |
47 : command_buffer_(command_buffer), | 43 : command_buffer_(command_buffer), |
48 entries_(NULL), | 44 entries_(NULL), |
49 entry_count_(0), | 45 entry_count_(0), |
50 token_(0), | 46 token_(0), |
51 last_token_read_(-1), | 47 last_token_read_(-1), |
52 get_(0), | 48 get_(0), |
53 put_(0) { | 49 put_(0) { |
54 } | 50 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 put_ += entries; | 182 put_ += entries; |
187 return space; | 183 return space; |
188 } | 184 } |
189 | 185 |
190 parse_error::ParseError CommandBufferHelper::GetParseError() { | 186 parse_error::ParseError CommandBufferHelper::GetParseError() { |
191 int32 parse_error = command_buffer_->ResetParseError(); | 187 int32 parse_error = command_buffer_->ResetParseError(); |
192 return static_cast<parse_error::ParseError>(parse_error); | 188 return static_cast<parse_error::ParseError>(parse_error); |
193 } | 189 } |
194 | 190 |
195 } // namespace command_buffer | 191 } // namespace command_buffer |
OLD | NEW |