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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); | 140 void SetPreemptByFlag(scoped_refptr<gpu::PreemptionFlag> flag); |
141 | 141 |
142 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); | 142 void SetLatencyInfoCallback(const LatencyInfoCallback& callback); |
143 | 143 |
144 void MarkContextLost(); | 144 void MarkContextLost(); |
145 | 145 |
146 uint64 GetMemoryUsage() const; | 146 uint64 GetMemoryUsage() const; |
147 | 147 |
148 void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); | 148 void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info); |
| 149 void PageFlipCompleted(); |
149 | 150 |
150 private: | 151 private: |
151 GpuMemoryManager* GetMemoryManager() const; | 152 GpuMemoryManager* GetMemoryManager() const; |
152 bool MakeCurrent(); | 153 bool MakeCurrent(); |
153 void Destroy(); | 154 void Destroy(); |
154 | 155 |
155 // Cleans up and sends reply if OnInitialize failed. | 156 // Cleans up and sends reply if OnInitialize failed. |
156 void OnInitializeFailed(IPC::Message* reply_message); | 157 void OnInitializeFailed(IPC::Message* reply_message); |
157 | 158 |
158 // Message handlers: | 159 // Message handlers: |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 size_t total_gpu_memory_; | 280 size_t total_gpu_memory_; |
280 scoped_ptr<WaitForCommandState> wait_for_token_; | 281 scoped_ptr<WaitForCommandState> wait_for_token_; |
281 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 282 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
282 | 283 |
283 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 284 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
284 }; | 285 }; |
285 | 286 |
286 } // namespace content | 287 } // namespace content |
287 | 288 |
288 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 289 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |