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 10 matching lines...) Expand all Loading... |
21 using ::base::SharedMemory; | 21 using ::base::SharedMemory; |
22 | 22 |
23 namespace gpu { | 23 namespace gpu { |
24 | 24 |
25 const int64 kUnscheduleFenceTimeOutDelay = 10000; | 25 const int64 kUnscheduleFenceTimeOutDelay = 10000; |
26 | 26 |
27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
28 const int64 kRescheduleTimeOutDelay = 1000; | 28 const int64 kRescheduleTimeOutDelay = 1000; |
29 #endif | 29 #endif |
30 | 30 |
31 GpuScheduler::GpuScheduler(CommandBuffer* command_buffer, | 31 GpuScheduler::GpuScheduler(CommandBufferServiceBase* command_buffer, |
32 AsyncAPIInterface* handler, | 32 AsyncAPIInterface* handler, |
33 gles2::GLES2Decoder* decoder) | 33 gles2::GLES2Decoder* decoder) |
34 : command_buffer_(command_buffer), | 34 : command_buffer_(command_buffer), |
35 handler_(handler), | 35 handler_(handler), |
36 decoder_(decoder), | 36 decoder_(decoder), |
37 unscheduled_count_(0), | 37 unscheduled_count_(0), |
38 rescheduled_count_(0), | 38 rescheduled_count_(0), |
39 reschedule_task_factory_(this), | 39 reschedule_task_factory_(this), |
40 was_preempted_(false) {} | 40 was_preempted_(false) {} |
41 | 41 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 base::Closure task_) | 303 base::Closure task_) |
304 : fence(fence_), | 304 : fence(fence_), |
305 issue_time(base::Time::Now()), | 305 issue_time(base::Time::Now()), |
306 task(task_) { | 306 task(task_) { |
307 } | 307 } |
308 | 308 |
309 GpuScheduler::UnscheduleFence::~UnscheduleFence() { | 309 GpuScheduler::UnscheduleFence::~UnscheduleFence() { |
310 } | 310 } |
311 | 311 |
312 } // namespace gpu | 312 } // namespace gpu |
OLD | NEW |