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/gpu_scheduler.h" | 5 #include "gpu/command_buffer/service/gpu_scheduler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 | 180 |
181 Buffer GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) { | 181 Buffer GpuScheduler::GetSharedMemoryBuffer(int32 shm_id) { |
182 return command_buffer_->GetTransferBuffer(shm_id); | 182 return command_buffer_->GetTransferBuffer(shm_id); |
183 } | 183 } |
184 | 184 |
185 void GpuScheduler::set_token(int32 token) { | 185 void GpuScheduler::set_token(int32 token) { |
186 command_buffer_->SetToken(token); | 186 command_buffer_->SetToken(token); |
187 } | 187 } |
188 | 188 |
| 189 void GpuScheduler::set_serial(uint32 serial) { |
| 190 command_buffer_->SetSerial(serial); |
| 191 } |
| 192 |
189 bool GpuScheduler::SetGetBuffer(int32 transfer_buffer_id) { | 193 bool GpuScheduler::SetGetBuffer(int32 transfer_buffer_id) { |
190 Buffer ring_buffer = command_buffer_->GetTransferBuffer(transfer_buffer_id); | 194 Buffer ring_buffer = command_buffer_->GetTransferBuffer(transfer_buffer_id); |
191 if (!ring_buffer.ptr) { | 195 if (!ring_buffer.ptr) { |
192 return false; | 196 return false; |
193 } | 197 } |
194 | 198 |
195 if (!parser_.get()) { | 199 if (!parser_.get()) { |
196 parser_.reset(new CommandParser(handler_)); | 200 parser_.reset(new CommandParser(handler_)); |
197 } | 201 } |
198 | 202 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 base::Closure task_) | 306 base::Closure task_) |
303 : fence(fence_), | 307 : fence(fence_), |
304 issue_time(base::Time::Now()), | 308 issue_time(base::Time::Now()), |
305 task(task_) { | 309 task(task_) { |
306 } | 310 } |
307 | 311 |
308 GpuScheduler::UnscheduleFence::~UnscheduleFence() { | 312 GpuScheduler::UnscheduleFence::~UnscheduleFence() { |
309 } | 313 } |
310 | 314 |
311 } // namespace gpu | 315 } // namespace gpu |
OLD | NEW |