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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/atomic_ref_count.h" | 10 #include "base/atomic_ref_count.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 typedef base::Callback<void(bool /* scheduled */)> SchedulingChangedCallback; | 79 typedef base::Callback<void(bool /* scheduled */)> SchedulingChangedCallback; |
80 | 80 |
81 // Sets a callback that is invoked just before scheduler is rescheduled | 81 // Sets a callback that is invoked just before scheduler is rescheduled |
82 // or descheduled. Takes ownership of callback object. | 82 // or descheduled. Takes ownership of callback object. |
83 void SetSchedulingChangedCallback(const SchedulingChangedCallback& callback); | 83 void SetSchedulingChangedCallback(const SchedulingChangedCallback& callback); |
84 | 84 |
85 // Implementation of CommandBufferEngine. | 85 // Implementation of CommandBufferEngine. |
86 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) OVERRIDE; | 86 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) OVERRIDE; |
87 virtual void set_token(int32 token) OVERRIDE; | 87 virtual void set_token(int32 token) OVERRIDE; |
| 88 virtual void set_serial(uint32 serial) OVERRIDE; |
88 virtual bool SetGetBuffer(int32 transfer_buffer_id) OVERRIDE; | 89 virtual bool SetGetBuffer(int32 transfer_buffer_id) OVERRIDE; |
89 virtual bool SetGetOffset(int32 offset) OVERRIDE; | 90 virtual bool SetGetOffset(int32 offset) OVERRIDE; |
90 virtual int32 GetGetOffset() OVERRIDE; | 91 virtual int32 GetGetOffset() OVERRIDE; |
91 | 92 |
92 void SetCommandProcessedCallback(const base::Closure& callback); | 93 void SetCommandProcessedCallback(const base::Closure& callback); |
93 | 94 |
94 void DeferToFence(base::Closure task); | 95 void DeferToFence(base::Closure task); |
95 | 96 |
96 // Polls the fences, invoking callbacks that were waiting to be triggered | 97 // Polls the fences, invoking callbacks that were waiting to be triggered |
97 // by them and returns whether all fences were complete. | 98 // by them and returns whether all fences were complete. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early. | 160 // If non-NULL and |preemption_flag_->IsSet()|, exit PutChanged early. |
160 scoped_refptr<PreemptionFlag> preemption_flag_; | 161 scoped_refptr<PreemptionFlag> preemption_flag_; |
161 bool was_preempted_; | 162 bool was_preempted_; |
162 | 163 |
163 DISALLOW_COPY_AND_ASSIGN(GpuScheduler); | 164 DISALLOW_COPY_AND_ASSIGN(GpuScheduler); |
164 }; | 165 }; |
165 | 166 |
166 } // namespace gpu | 167 } // namespace gpu |
167 | 168 |
168 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 169 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
OLD | NEW |