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_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // Multimap is used to simulate reference counting, see comment in | 164 // Multimap is used to simulate reference counting, see comment in |
165 // GpuProcessHostUIShim::CreateViewCommandBuffer. | 165 // GpuProcessHostUIShim::CreateViewCommandBuffer. |
166 class SurfaceRef; | 166 class SurfaceRef; |
167 typedef std::multimap<int, linked_ptr<SurfaceRef> > SurfaceRefMap; | 167 typedef std::multimap<int, linked_ptr<SurfaceRef> > SurfaceRefMap; |
168 SurfaceRefMap surface_refs_; | 168 SurfaceRefMap surface_refs_; |
169 #endif | 169 #endif |
170 | 170 |
171 // Qeueud messages to send when the process launches. | 171 // Qeueud messages to send when the process launches. |
172 std::queue<IPC::Message*> queued_messages_; | 172 std::queue<IPC::Message*> queued_messages_; |
173 | 173 |
| 174 // Whether the GPU process is valid, set to false after Send() failed. |
| 175 bool valid_; |
| 176 |
174 // Whether we are running a GPU thread inside the browser process instead | 177 // Whether we are running a GPU thread inside the browser process instead |
175 // of a separate GPU process. | 178 // of a separate GPU process. |
176 bool in_process_; | 179 bool in_process_; |
177 | 180 |
178 bool software_rendering_; | 181 bool software_rendering_; |
179 GpuProcessKind kind_; | 182 GpuProcessKind kind_; |
180 | 183 |
181 scoped_ptr<GpuMainThread> in_process_gpu_thread_; | 184 scoped_ptr<GpuMainThread> in_process_gpu_thread_; |
182 | 185 |
183 // Whether we actually launched a GPU process. | 186 // Whether we actually launched a GPU process. |
184 bool process_launched_; | 187 bool process_launched_; |
185 | 188 |
186 // Time Init started. Used to log total GPU process startup time to UMA. | 189 // Time Init started. Used to log total GPU process startup time to UMA. |
187 base::TimeTicks init_start_time_; | 190 base::TimeTicks init_start_time_; |
188 | 191 |
189 // Master switch for enabling/disabling GPU acceleration for the current | 192 // Master switch for enabling/disabling GPU acceleration for the current |
190 // browser session. It does not change the acceleration settings for | 193 // browser session. It does not change the acceleration settings for |
191 // existing tabs, just the future ones. | 194 // existing tabs, just the future ones. |
192 static bool gpu_enabled_; | 195 static bool gpu_enabled_; |
193 | 196 |
194 static bool hardware_gpu_enabled_; | 197 static bool hardware_gpu_enabled_; |
195 | 198 |
196 scoped_ptr<BrowserChildProcessHostImpl> process_; | 199 scoped_ptr<BrowserChildProcessHostImpl> process_; |
197 | 200 |
198 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 201 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
199 }; | 202 }; |
200 | 203 |
201 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 204 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
OLD | NEW |