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 17 matching lines...) Expand all Loading... |
28 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
29 #include "ui/gfx/size.h" | 29 #include "ui/gfx/size.h" |
30 #include "ui/gl/gl_surface.h" | 30 #include "ui/gl/gl_surface.h" |
31 #include "ui/gl/gpu_preference.h" | 31 #include "ui/gl/gpu_preference.h" |
32 #include "url/gurl.h" | 32 #include "url/gurl.h" |
33 | 33 |
34 namespace gpu { | 34 namespace gpu { |
35 class GpuControlService; | 35 class GpuControlService; |
36 struct Mailbox; | 36 struct Mailbox; |
37 namespace gles2 { | 37 namespace gles2 { |
38 class ImageManager; | |
39 class MailboxManager; | 38 class MailboxManager; |
40 } | 39 } |
41 } | 40 } |
42 | 41 |
43 namespace content { | 42 namespace content { |
44 | 43 |
45 class GpuChannel; | 44 class GpuChannel; |
46 class GpuVideoDecodeAccelerator; | 45 class GpuVideoDecodeAccelerator; |
47 class GpuVideoEncodeAccelerator; | 46 class GpuVideoEncodeAccelerator; |
48 class GpuWatchdog; | 47 class GpuWatchdog; |
(...skipping 15 matching lines...) Expand all Loading... |
64 }; | 63 }; |
65 | 64 |
66 typedef base::Callback<void(const std::vector<ui::LatencyInfo>&)> | 65 typedef base::Callback<void(const std::vector<ui::LatencyInfo>&)> |
67 LatencyInfoCallback; | 66 LatencyInfoCallback; |
68 | 67 |
69 GpuCommandBufferStub( | 68 GpuCommandBufferStub( |
70 GpuChannel* channel, | 69 GpuChannel* channel, |
71 GpuCommandBufferStub* share_group, | 70 GpuCommandBufferStub* share_group, |
72 const gfx::GLSurfaceHandle& handle, | 71 const gfx::GLSurfaceHandle& handle, |
73 gpu::gles2::MailboxManager* mailbox_manager, | 72 gpu::gles2::MailboxManager* mailbox_manager, |
74 gpu::gles2::ImageManager* image_manager, | |
75 const gfx::Size& size, | 73 const gfx::Size& size, |
76 const gpu::gles2::DisallowedFeatures& disallowed_features, | 74 const gpu::gles2::DisallowedFeatures& disallowed_features, |
77 const std::vector<int32>& attribs, | 75 const std::vector<int32>& attribs, |
78 gfx::GpuPreference gpu_preference, | 76 gfx::GpuPreference gpu_preference, |
79 bool use_virtualized_gl_context, | 77 bool use_virtualized_gl_context, |
80 int32 route_id, | 78 int32 route_id, |
81 int32 surface_id, | 79 int32 surface_id, |
82 GpuWatchdog* watchdog, | 80 GpuWatchdog* watchdog, |
83 bool software, | 81 bool software, |
84 const GURL& active_url); | 82 const GURL& active_url); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void OnRetireSyncPoint(uint32 sync_point); | 191 void OnRetireSyncPoint(uint32 sync_point); |
194 bool OnWaitSyncPoint(uint32 sync_point); | 192 bool OnWaitSyncPoint(uint32 sync_point); |
195 void OnSyncPointRetired(); | 193 void OnSyncPointRetired(); |
196 void OnSignalSyncPoint(uint32 sync_point, uint32 id); | 194 void OnSignalSyncPoint(uint32 sync_point, uint32 id); |
197 void OnSignalSyncPointAck(uint32 id); | 195 void OnSignalSyncPointAck(uint32 id); |
198 void OnSignalQuery(uint32 query, uint32 id); | 196 void OnSignalQuery(uint32 query, uint32 id); |
199 | 197 |
200 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); | 198 void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback); |
201 | 199 |
202 void OnRegisterGpuMemoryBuffer(int32 id, | 200 void OnRegisterGpuMemoryBuffer(int32 id, |
203 gfx::GpuMemoryBufferHandle gpu_memory_buffer, | 201 gfx::GpuMemoryBufferHandle handle, |
204 uint32 width, | 202 uint32 width, |
205 uint32 height, | 203 uint32 height, |
206 uint32 internalformat); | 204 uint32 internalformat); |
207 void OnDestroyGpuMemoryBuffer(int32 id); | 205 void OnDestroyGpuMemoryBuffer(int32 id); |
208 | 206 |
209 void OnCommandProcessed(); | 207 void OnCommandProcessed(); |
210 void OnParseError(); | 208 void OnParseError(); |
211 void OnSetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); | 209 void OnSetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); |
212 void OnCreateStreamTexture( | 210 void OnCreateStreamTexture( |
213 uint32 texture_id, int32 stream_id, bool* succeeded); | 211 uint32 texture_id, int32 stream_id, bool* succeeded); |
(...skipping 30 matching lines...) Expand all Loading... |
244 bool use_virtualized_gl_context_; | 242 bool use_virtualized_gl_context_; |
245 int32 route_id_; | 243 int32 route_id_; |
246 int32 surface_id_; | 244 int32 surface_id_; |
247 bool software_; | 245 bool software_; |
248 uint32 last_flush_count_; | 246 uint32 last_flush_count_; |
249 | 247 |
250 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 248 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
251 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; | 249 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; |
252 scoped_ptr<gpu::GpuScheduler> scheduler_; | 250 scoped_ptr<gpu::GpuScheduler> scheduler_; |
253 scoped_refptr<gfx::GLSurface> surface_; | 251 scoped_refptr<gfx::GLSurface> surface_; |
254 scoped_ptr<gpu::GpuControlService> gpu_control_service_; | |
255 | 252 |
256 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; | 253 scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_; |
257 // The last memory allocation received from the GpuMemoryManager (used to | 254 // The last memory allocation received from the GpuMemoryManager (used to |
258 // elide redundant work). | 255 // elide redundant work). |
259 bool last_memory_allocation_valid_; | 256 bool last_memory_allocation_valid_; |
260 gpu::MemoryAllocation last_memory_allocation_; | 257 gpu::MemoryAllocation last_memory_allocation_; |
261 | 258 |
262 GpuWatchdog* watchdog_; | 259 GpuWatchdog* watchdog_; |
263 | 260 |
264 ObserverList<DestructionObserver> destruction_observers_; | 261 ObserverList<DestructionObserver> destruction_observers_; |
(...skipping 16 matching lines...) Expand all Loading... |
281 size_t total_gpu_memory_; | 278 size_t total_gpu_memory_; |
282 scoped_ptr<WaitForCommandState> wait_for_token_; | 279 scoped_ptr<WaitForCommandState> wait_for_token_; |
283 scoped_ptr<WaitForCommandState> wait_for_get_offset_; | 280 scoped_ptr<WaitForCommandState> wait_for_get_offset_; |
284 | 281 |
285 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 282 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
286 }; | 283 }; |
287 | 284 |
288 } // namespace content | 285 } // namespace content |
289 | 286 |
290 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 287 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
OLD | NEW |