OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 gpu::CommandBuffer::State GetLastState() const; | 80 gpu::CommandBuffer::State GetLastState() const; |
81 gpu::CommandBufferNamespace GetNamespaceID() const { | 81 gpu::CommandBufferNamespace GetNamespaceID() const { |
82 return command_buffer_namespace_; | 82 return command_buffer_namespace_; |
83 } | 83 } |
84 uint64_t GetCommandBufferID() const { return command_buffer_id_; } | 84 uint64_t GetCommandBufferID() const { return command_buffer_id_; } |
85 gpu::SyncPointOrderData* sync_point_order_data() { | 85 gpu::SyncPointOrderData* sync_point_order_data() { |
86 return sync_point_order_data_.get(); | 86 return sync_point_order_data_.get(); |
87 } | 87 } |
88 uint32_t GetUnprocessedOrderNum() const; | 88 uint32_t GetUnprocessedOrderNum() const; |
89 uint32_t GetProcessedOrderNum() const; | 89 uint32_t GetProcessedOrderNum() const; |
| 90 void SignalQuery(uint32_t query_id, const base::Closure& callback); |
90 | 91 |
91 private: | 92 private: |
92 bool MakeCurrent(); | 93 bool MakeCurrent(); |
93 | 94 |
94 // Process pending queries and call |ScheduleDelayedWork| to schedule | 95 // Process pending queries and call |ScheduleDelayedWork| to schedule |
95 // processing of delayed work. | 96 // processing of delayed work. |
96 void ProcessPendingAndIdleWork(); | 97 void ProcessPendingAndIdleWork(); |
97 | 98 |
98 // Schedule processing of delayed work. This updates the time at which | 99 // Schedule processing of delayed work. This updates the time at which |
99 // delayed work should be processed. |process_delayed_work_time_| is | 100 // delayed work should be processed. |process_delayed_work_time_| is |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 base::TimeTicks last_idle_time_; | 140 base::TimeTicks last_idle_time_; |
140 | 141 |
141 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; | 142 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); | 144 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace mus | 147 } // namespace mus |
147 | 148 |
148 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ | 149 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ |
OLD | NEW |