| 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 #include "gpu/command_buffer/service/command_buffer_service.h" | 5 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| 11 #include "gpu/command_buffer/common/cmd_buffer_common.h" | 11 #include "gpu/command_buffer/common/cmd_buffer_common.h" |
| 12 #include "gpu/command_buffer/common/command_buffer_shared.h" | 12 #include "gpu/command_buffer/common/command_buffer_shared.h" |
| 13 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 13 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
| 14 | 14 |
| 15 using ::base::SharedMemory; | 15 using ::base::SharedMemory; |
| 16 | 16 |
| 17 namespace gpu { | 17 namespace gpu { |
| 18 | 18 |
| 19 CommandBufferService::CommandBufferService( | 19 CommandBufferService::CommandBufferService( |
| 20 TransferBufferManagerInterface* transfer_buffer_manager) | 20 TransferBufferManagerInterface* transfer_buffer_manager, |
| 21 : ring_buffer_id_(-1), | 21 CommandBufferNamespace namespace_id, uint64_t command_buffer_id) |
| 22 : CommandBufferServiceBase(namespace_id, command_buffer_id), |
| 23 ring_buffer_id_(-1), |
| 22 shared_state_(NULL), | 24 shared_state_(NULL), |
| 23 num_entries_(0), | 25 num_entries_(0), |
| 24 get_offset_(0), | 26 get_offset_(0), |
| 25 put_offset_(0), | 27 put_offset_(0), |
| 26 transfer_buffer_manager_(transfer_buffer_manager), | 28 transfer_buffer_manager_(transfer_buffer_manager), |
| 27 token_(0), | 29 token_(0), |
| 28 generation_(0), | 30 generation_(0), |
| 29 error_(error::kNoError), | 31 error_(error::kNoError), |
| 30 context_lost_reason_(error::kUnknown) { | 32 context_lost_reason_(error::kUnknown) { |
| 31 } | 33 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 const GetBufferChangedCallback& callback) { | 196 const GetBufferChangedCallback& callback) { |
| 195 get_buffer_change_callback_ = callback; | 197 get_buffer_change_callback_ = callback; |
| 196 } | 198 } |
| 197 | 199 |
| 198 void CommandBufferService::SetParseErrorCallback( | 200 void CommandBufferService::SetParseErrorCallback( |
| 199 const base::Closure& callback) { | 201 const base::Closure& callback) { |
| 200 parse_error_callback_ = callback; | 202 parse_error_callback_ = callback; |
| 201 } | 203 } |
| 202 | 204 |
| 203 } // namespace gpu | 205 } // namespace gpu |
| OLD | NEW |