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> |
11 | 11 |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/common/gpu/gpu_memory_allocation.h" | 16 #include "content/common/gpu/gpu_memory_allocation.h" |
17 #include "content/common/gpu/gpu_memory_manager.h" | 17 #include "content/common/gpu/gpu_memory_manager.h" |
18 #include "content/common/gpu/gpu_memory_manager_client.h" | 18 #include "content/common/gpu/gpu_memory_manager_client.h" |
19 #include "gpu/command_buffer/common/constants.h" | 19 #include "gpu/command_buffer/common/constants.h" |
20 #include "gpu/command_buffer/service/command_buffer_service.h" | 20 #include "gpu/command_buffer/service/command_buffer_service.h" |
21 #include "gpu/command_buffer/service/context_group.h" | 21 #include "gpu/command_buffer/service/context_group.h" |
22 #include "gpu/command_buffer/service/gpu_scheduler.h" | 22 #include "gpu/command_buffer/service/gpu_scheduler.h" |
23 #include "ipc/ipc_listener.h" | 23 #include "ipc/ipc_listener.h" |
24 #include "ipc/ipc_sender.h" | 24 #include "ipc/ipc_sender.h" |
25 #include "media/base/video_decoder_config.h" | 25 #include "media/base/video_decoder_config.h" |
26 #include "ui/events/latency_info.h" | 26 #include "ui/events/latency_info.h" |
| 27 #include "ui/gfx/gpu_memory_buffer.h" |
27 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
28 #include "ui/gfx/size.h" | 29 #include "ui/gfx/size.h" |
29 #include "ui/gl/gl_surface.h" | 30 #include "ui/gl/gl_surface.h" |
30 #include "ui/gl/gpu_preference.h" | 31 #include "ui/gl/gpu_preference.h" |
31 #include "url/gurl.h" | 32 #include "url/gurl.h" |
32 | 33 |
33 namespace gpu { | 34 namespace gpu { |
| 35 class GpuControlService; |
34 struct Mailbox; | 36 struct Mailbox; |
35 namespace gles2 { | 37 namespace gles2 { |
36 class ImageManager; | 38 class ImageManager; |
37 class MailboxManager; | 39 class MailboxManager; |
38 } | 40 } |
39 } | 41 } |
40 | 42 |
41 namespace content { | 43 namespace content { |
42 | 44 |
43 class GpuChannel; | 45 class GpuChannel; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void OnRetireSyncPoint(uint32 sync_point); | 176 void OnRetireSyncPoint(uint32 sync_point); |
175 bool OnWaitSyncPoint(uint32 sync_point); | 177 bool OnWaitSyncPoint(uint32 sync_point); |
176 void OnSyncPointRetired(); | 178 void OnSyncPointRetired(); |
177 void OnSignalSyncPoint(uint32 sync_point, uint32 id); | 179 void OnSignalSyncPoint(uint32 sync_point, uint32 id); |
178 void OnSignalSyncPointAck(uint32 id); | 180 void OnSignalSyncPointAck(uint32 id); |
179 void OnSignalQuery(uint32 query, uint32 id); | 181 void OnSignalQuery(uint32 query, uint32 id); |
180 | 182 |
181 void OnReceivedClientManagedMemoryStats(const GpuManagedMemoryStats& stats); | 183 void OnReceivedClientManagedMemoryStats(const GpuManagedMemoryStats& stats); |
182 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); | 184 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); |
183 | 185 |
| 186 void OnRegisterGpuMemoryBuffer(int32 id, |
| 187 gfx::GpuMemoryBufferHandle gpu_memory_buffer, |
| 188 uint32 width, |
| 189 uint32 height, |
| 190 uint32 internalformat); |
| 191 void OnDestroyGpuMemoryBuffer(int32 id); |
| 192 |
184 void OnCommandProcessed(); | 193 void OnCommandProcessed(); |
185 void OnParseError(); | 194 void OnParseError(); |
186 void OnSetLatencyInfo(const ui::LatencyInfo& latency_info); | 195 void OnSetLatencyInfo(const ui::LatencyInfo& latency_info); |
187 | 196 |
188 void ReportState(); | 197 void ReportState(); |
189 | 198 |
190 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. | 199 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL. |
191 void PutChanged(); | 200 void PutChanged(); |
192 | 201 |
193 // Poll the command buffer to execute work. | 202 // Poll the command buffer to execute work. |
(...skipping 22 matching lines...) Expand all Loading... |
216 bool use_virtualized_gl_context_; | 225 bool use_virtualized_gl_context_; |
217 int32 route_id_; | 226 int32 route_id_; |
218 int32 surface_id_; | 227 int32 surface_id_; |
219 bool software_; | 228 bool software_; |
220 uint32 last_flush_count_; | 229 uint32 last_flush_count_; |
221 | 230 |
222 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 231 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
223 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 232 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
224 scoped_ptr<gpu::GpuScheduler> scheduler_; | 233 scoped_ptr<gpu::GpuScheduler> scheduler_; |
225 scoped_refptr<gfx::GLSurface> surface_; | 234 scoped_refptr<gfx::GLSurface> surface_; |
| 235 scoped_ptr<gpu::GpuControlService> gpu_control_; |
226 | 236 |
227 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; | 237 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; |
228 // The last memory allocation received from the GpuMemoryManager (used to | 238 // The last memory allocation received from the GpuMemoryManager (used to |
229 // elide redundant work). | 239 // elide redundant work). |
230 bool last_memory_allocation_valid_; | 240 bool last_memory_allocation_valid_; |
231 GpuMemoryAllocation last_memory_allocation_; | 241 GpuMemoryAllocation last_memory_allocation_; |
232 | 242 |
233 GpuWatchdog* watchdog_; | 243 GpuWatchdog* watchdog_; |
234 | 244 |
235 ObserverList<DestructionObserver> destruction_observers_; | 245 ObserverList<DestructionObserver> destruction_observers_; |
(...skipping 14 matching lines...) Expand all Loading... |
250 size_t active_url_hash_; | 260 size_t active_url_hash_; |
251 | 261 |
252 size_t total_gpu_memory_; | 262 size_t total_gpu_memory_; |
253 | 263 |
254 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 264 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
255 }; | 265 }; |
256 | 266 |
257 } // namespace content | 267 } // namespace content |
258 | 268 |
259 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 269 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |