Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: content/browser/gpu/gpu_process_host.h

Issue 1249313004: Remove GPU relinquish resources infrastructure and stop GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove TODO Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <set> 10 #include <set>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 const CreateGpuMemoryBufferCallback& callback); 134 const CreateGpuMemoryBufferCallback& callback);
135 135
136 // Tells the GPU process to destroy GPU memory buffer. 136 // Tells the GPU process to destroy GPU memory buffer.
137 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 137 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
138 int client_id, 138 int client_id,
139 int sync_point); 139 int sync_point);
140 140
141 // What kind of GPU process, e.g. sandboxed or unsandboxed. 141 // What kind of GPU process, e.g. sandboxed or unsandboxed.
142 GpuProcessKind kind(); 142 GpuProcessKind kind();
143 143
144 // Forcefully terminates the GPU process.
144 void ForceShutdown(); 145 void ForceShutdown();
145 146
147 // Asks the GPU process to stop by itself.
148 void StopGpuProcess();
149
146 void BeginFrameSubscription( 150 void BeginFrameSubscription(
147 int surface_id, 151 int surface_id,
148 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber); 152 base::WeakPtr<RenderWidgetHostViewFrameSubscriber> subscriber);
149 void EndFrameSubscription(int surface_id); 153 void EndFrameSubscription(int surface_id);
150 void LoadedShader(const std::string& key, const std::string& data); 154 void LoadedShader(const std::string& key, const std::string& data);
151 155
152 private: 156 private:
153 static bool ValidateHost(GpuProcessHost* host); 157 static bool ValidateHost(GpuProcessHost* host);
154 158
155 GpuProcessHost(int host_id, GpuProcessKind kind); 159 GpuProcessHost(int host_id, GpuProcessKind kind);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 GpuProcessKind kind_; 232 GpuProcessKind kind_;
229 233
230 scoped_ptr<base::Thread> in_process_gpu_thread_; 234 scoped_ptr<base::Thread> in_process_gpu_thread_;
231 235
232 // Whether we actually launched a GPU process. 236 // Whether we actually launched a GPU process.
233 bool process_launched_; 237 bool process_launched_;
234 238
235 // Whether the GPU process successfully initialized. 239 // Whether the GPU process successfully initialized.
236 bool initialized_; 240 bool initialized_;
237 241
242 // Whether the GPU process is shutting down or not.
243 bool expecting_shutdown_;
244
238 // Time Init started. Used to log total GPU process startup time to UMA. 245 // Time Init started. Used to log total GPU process startup time to UMA.
239 base::TimeTicks init_start_time_; 246 base::TimeTicks init_start_time_;
240 247
241 // Whether this host recorded a GPU crash or not. 248 // Whether this host recorded a GPU crash or not.
242 bool gpu_crash_recorded_; 249 bool gpu_crash_recorded_;
243 250
244 // Master switch for enabling/disabling GPU acceleration for the current 251 // Master switch for enabling/disabling GPU acceleration for the current
245 // browser session. It does not change the acceleration settings for 252 // browser session. It does not change the acceleration settings for
246 // existing tabs, just the future ones. 253 // existing tabs, just the future ones.
247 static bool gpu_enabled_; 254 static bool gpu_enabled_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // IOSurfaces. 298 // IOSurfaces.
292 IOSurfaceManagerToken io_surface_manager_token_; 299 IOSurfaceManagerToken io_surface_manager_token_;
293 #endif 300 #endif
294 301
295 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 302 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
296 }; 303 };
297 304
298 } // namespace content 305 } // namespace content
299 306
300 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 307 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host_ui_shim.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698