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 implementation of the command buffer helper class. | 5 // This file contains the implementation of the command buffer helper class. |
6 | 6 |
7 #include "../client/cmd_buffer_helper.h" | 7 #include "gpu/command_buffer/client/cmd_buffer_helper.h" |
8 #include "../common/command_buffer.h" | 8 #include "gpu/command_buffer/common/command_buffer.h" |
9 #include "../common/trace_event.h" | 9 #include "gpu/command_buffer/common/trace_event.h" |
10 | 10 |
11 namespace gpu { | 11 namespace gpu { |
12 | 12 |
13 namespace { | 13 namespace { |
14 const int kCommandsPerFlushCheck = 100; | 14 const int kCommandsPerFlushCheck = 100; |
15 const double kFlushDelay = 1.0 / (5.0 * 60.0); | 15 const double kFlushDelay = 1.0 / (5.0 * 60.0); |
16 } | 16 } |
17 | 17 |
18 CommandBufferHelper::CommandBufferHelper(CommandBuffer* command_buffer) | 18 CommandBufferHelper::CommandBufferHelper(CommandBuffer* command_buffer) |
19 : command_buffer_(command_buffer), | 19 : command_buffer_(command_buffer), |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 return space; | 273 return space; |
274 } | 274 } |
275 | 275 |
276 error::Error CommandBufferHelper::GetError() { | 276 error::Error CommandBufferHelper::GetError() { |
277 CommandBuffer::State state = command_buffer_->GetState(); | 277 CommandBuffer::State state = command_buffer_->GetState(); |
278 return static_cast<error::Error>(state.error); | 278 return static_cast<error::Error>(state.error); |
279 } | 279 } |
280 | 280 |
281 } // namespace gpu | 281 } // namespace gpu |
OLD | NEW |