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

Unified Diff: content/gpu/in_process_gpu_thread.cc

Issue 1716813002: Use GpuPreferences to avoid directly accessing switches in gpu related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/in_process_gpu_thread.h ('k') | gpu/command_buffer/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/in_process_gpu_thread.cc
diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc
index f0a97b7cdb6c561edbb72971b596ae7f7282a70d..1453ff2ab9ea9cbb9c84b7c74a0f79e5dd43551a 100644
--- a/content/gpu/in_process_gpu_thread.cc
+++ b/content/gpu/in_process_gpu_thread.cc
@@ -19,10 +19,12 @@ namespace content {
InProcessGpuThread::InProcessGpuThread(
const InProcessChildThreadParams& params,
+ const gpu::GpuPreferences& gpu_preferences,
gpu::SyncPointManager* sync_point_manager_override)
: base::Thread("Chrome_InProcGpuThread"),
params_(params),
gpu_process_(NULL),
+ gpu_preferences_(gpu_preferences),
sync_point_manager_override_(sync_point_manager_override),
gpu_memory_buffer_factory_(
GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER
@@ -56,7 +58,8 @@ void InProcessGpuThread::Init() {
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
GpuChildThread* child_thread = new GpuChildThread(
- params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_);
+ gpu_preferences_, params_, gpu_memory_buffer_factory_.get(),
+ sync_point_manager_override_);
// Since we are in the browser process, use the thread start time as the
// process start time.
@@ -72,7 +75,8 @@ void InProcessGpuThread::CleanUp() {
base::Thread* CreateInProcessGpuThread(
const InProcessChildThreadParams& params) {
- return new InProcessGpuThread(params, nullptr);
+ return new InProcessGpuThread(
+ params, GpuChildThread::GetGpuPreferencesFromCommandLine(), nullptr);
}
} // namespace content
« no previous file with comments | « content/gpu/in_process_gpu_thread.h ('k') | gpu/command_buffer/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698