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

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
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..ce9332c79cb2309ddecb516ac2a81f2b8d66161c 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,7 @@ void InProcessGpuThread::CleanUp() {
base::Thread* CreateInProcessGpuThread(
const InProcessChildThreadParams& params) {
- return new InProcessGpuThread(params, nullptr);
+ return new InProcessGpuThread(params, nullptr, nullptr);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698