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

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

Issue 8480015: Allow switching to SwiftShader when GPU is blacklisted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use correct feature flags for determining command line arguments Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Tells the GPU process to create a new command buffer that draws into the 74 // Tells the GPU process to create a new command buffer that draws into the
75 // window associated with the given renderer. 75 // window associated with the given renderer.
76 void CreateViewCommandBuffer( 76 void CreateViewCommandBuffer(
77 gfx::PluginWindowHandle compositing_surface, 77 gfx::PluginWindowHandle compositing_surface,
78 int32 render_view_id, 78 int32 render_view_id,
79 int32 renderer_id, 79 int32 renderer_id,
80 const GPUCreateCommandBufferConfig& init_params, 80 const GPUCreateCommandBufferConfig& init_params,
81 CreateCommandBufferCallback* callback); 81 CreateCommandBufferCallback* callback);
82 82
83 // Whether this GPU process is set up to use software rendering.
84 bool SoftwareRendering();
Zhenyao Mo 2011/11/10 18:34:34 Here also: software_rendering().
85
83 private: 86 private:
84 GpuProcessHost(int host_id); 87 GpuProcessHost(int host_id);
85 virtual ~GpuProcessHost(); 88 virtual ~GpuProcessHost();
86 89
87 bool Init(); 90 bool Init();
88 91
89 // Post an IPC message to the UI shim's message handler on the UI thread. 92 // Post an IPC message to the UI shim's message handler on the UI thread.
90 void RouteOnUIThread(const IPC::Message& message); 93 void RouteOnUIThread(const IPC::Message& message);
91 94
92 virtual bool CanShutdown(); 95 virtual bool CanShutdown();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Qeueud messages to send when the process launches. 145 // Qeueud messages to send when the process launches.
143 std::queue<IPC::Message*> queued_messages_; 146 std::queue<IPC::Message*> queued_messages_;
144 147
145 // The handle for the GPU process or null if it is not known to be launched. 148 // The handle for the GPU process or null if it is not known to be launched.
146 base::ProcessHandle gpu_process_; 149 base::ProcessHandle gpu_process_;
147 150
148 // Whether we are running a GPU thread inside the browser process instead 151 // Whether we are running a GPU thread inside the browser process instead
149 // of a separate GPU process. 152 // of a separate GPU process.
150 bool in_process_; 153 bool in_process_;
151 154
155 bool software_rendering_;
156
152 scoped_ptr<GpuMainThread> in_process_gpu_thread_; 157 scoped_ptr<GpuMainThread> in_process_gpu_thread_;
153 158
154 // Master switch for enabling/disabling GPU acceleration for the current 159 // Master switch for enabling/disabling GPU acceleration for the current
155 // browser session. It does not change the acceleration settings for 160 // browser session. It does not change the acceleration settings for
156 // existing tabs, just the future ones. 161 // existing tabs, just the future ones.
157 CONTENT_EXPORT static bool gpu_enabled_; 162 CONTENT_EXPORT static bool gpu_enabled_;
158 163
159 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 164 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
160 }; 165 };
161 166
162 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 167 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698