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_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_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/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/message_loop/message_loop_proxy.h" | 16 #include "base/message_loop/message_loop_proxy.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "content/common/content_param_traits.h" |
18 #include "content/common/gpu/devtools_gpu_instrumentation.h" | 19 #include "content/common/gpu/devtools_gpu_instrumentation.h" |
19 #include "content/common/gpu/gpu_memory_manager.h" | 20 #include "content/common/gpu/gpu_memory_manager.h" |
20 #include "ipc/ipc_listener.h" | 21 #include "ipc/ipc_listener.h" |
21 #include "ipc/ipc_sender.h" | 22 #include "ipc/ipc_sender.h" |
22 #include "ui/gfx/gpu_memory_buffer.h" | 23 #include "ui/gfx/gpu_memory_buffer.h" |
23 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
24 #include "ui/gl/gl_surface.h" | 25 #include "ui/gl/gl_surface.h" |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class WaitableEvent; | 28 class WaitableEvent; |
28 } | 29 } |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class GLShareGroup; | 32 class GLShareGroup; |
32 struct GpuMemoryBufferHandle; | 33 struct GpuMemoryBufferHandle; |
33 } | 34 } |
34 | 35 |
35 namespace gpu { | 36 namespace gpu { |
| 37 union ValueState; |
36 namespace gles2 { | 38 namespace gles2 { |
37 class MailboxManager; | 39 class MailboxManager; |
38 class ProgramCache; | 40 class ProgramCache; |
39 class ShaderTranslatorCache; | 41 class ShaderTranslatorCache; |
40 } | 42 } |
41 } | 43 } |
42 | 44 |
43 namespace IPC { | 45 namespace IPC { |
44 struct ChannelHandle; | 46 struct ChannelHandle; |
45 class SyncChannel; | 47 class SyncChannel; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, | 127 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, |
126 gfx::GpuMemoryBufferId id, | 128 gfx::GpuMemoryBufferId id, |
127 int client_id); | 129 int client_id); |
128 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferType type, | 130 void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferType type, |
129 gfx::GpuMemoryBufferId id, | 131 gfx::GpuMemoryBufferId id, |
130 int client_id); | 132 int client_id); |
131 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, | 133 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferType type, |
132 gfx::GpuMemoryBufferId id, | 134 gfx::GpuMemoryBufferId id, |
133 int client_id, | 135 int client_id, |
134 int32 sync_point); | 136 int32 sync_point); |
| 137 void OnUpdateValueState(int client_id, |
| 138 unsigned int target, |
| 139 const gpu::ValueState& state); |
135 | 140 |
136 void OnLoseAllContexts(); | 141 void OnLoseAllContexts(); |
137 | 142 |
138 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 143 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
139 base::WaitableEvent* shutdown_event_; | 144 base::WaitableEvent* shutdown_event_; |
140 | 145 |
141 // Used to send and receive IPC messages from the browser process. | 146 // Used to send and receive IPC messages from the browser process. |
142 MessageRouter* const router_; | 147 MessageRouter* const router_; |
143 | 148 |
144 // These objects manage channels to individual renderer processes there is | 149 // These objects manage channels to individual renderer processes there is |
(...skipping 17 matching lines...) Expand all Loading... |
162 // that any WeakPtrs to Controller are invalidated before its members | 167 // that any WeakPtrs to Controller are invalidated before its members |
163 // variable's destructors are executed, rendering them invalid. | 168 // variable's destructors are executed, rendering them invalid. |
164 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 169 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
165 | 170 |
166 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 171 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
167 }; | 172 }; |
168 | 173 |
169 } // namespace content | 174 } // namespace content |
170 | 175 |
171 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 176 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |