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 CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 void AddSyncPoint(uint32 sync_point); | 137 void AddSyncPoint(uint32 sync_point); |
138 | 138 |
139 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); | 139 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); |
140 | 140 |
141 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); | 141 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); |
142 | 142 |
143 void MarkContextLost(); | 143 void MarkContextLost(); |
144 | 144 |
145 uint64 GetMemoryUsage() const; | 145 uint64 GetMemoryUsage() const; |
146 | 146 |
| 147 void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); |
| 148 |
147 private: | 149 private: |
148 GpuMemoryManager* GetMemoryManager() const; | 150 GpuMemoryManager* GetMemoryManager() const; |
149 bool MakeCurrent(); | 151 bool MakeCurrent(); |
150 void Destroy(); | 152 void Destroy(); |
151 | 153 |
152 // Cleans up and sends reply if OnInitialize failed. | 154 // Cleans up and sends reply if OnInitialize failed. |
153 void OnInitializeFailed(IPC::Message* reply_message); | 155 void OnInitializeFailed(IPC::Message* reply_message); |
154 | 156 |
155 // Message handlers: | 157 // Message handlers: |
156 void OnInitialize(base::SharedMemoryHandle shared_state_shm, | 158 void OnInitialize(base::SharedMemoryHandle shared_state_shm, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 size_t total_gpu_memory_; | 278 size_t total_gpu_memory_; |
277 scoped_ptr<WaitForCommandState> wait_for_token_; | 279 scoped_ptr<WaitForCommandState> wait_for_token_; |
278 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 280 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
279 | 281 |
280 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 282 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
281 }; | 283 }; |
282 | 284 |
283 } // namespace content | 285 } // namespace content |
284 | 286 |
285 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 287 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |