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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 6eee7220acd55d4fc2c1bbc1916e39f4a11e0a58..6bb17ab6d39d9b9ddb2cd74f618d842f41209f6a 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -364,6 +364,9 @@ void GpuChildThread::StoreShaderToDisk(int32_t client_id,
void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
gpu_preferences_ = gpu_preferences;
+ gpu::GpuDriverBugWorkarounds::Initialize(
+ base::CommandLine::ForCurrentProcess(), gpu_driver_bug_workarounds_);
+
gpu_info_.video_decode_accelerator_capabilities =
content::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences_);
gpu_info_.video_encode_accelerator_supported_profiles =
@@ -395,12 +398,12 @@ void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
// Defer creation of the render thread. This is to prevent it from handling
// IPC messages before the sandbox has been enabled and all other necessary
// initialization has succeeded.
- gpu_channel_manager_.reset(
- new GpuChannelManager(gpu_preferences_, this, watchdog_thread_.get(),
- base::ThreadTaskRunnerHandle::Get().get(),
- ChildProcess::current()->io_task_runner(),
- ChildProcess::current()->GetShutDownEvent(),
- sync_point_manager_, gpu_memory_buffer_factory_));
+ gpu_channel_manager_.reset(new GpuChannelManager(
+ gpu_preferences_, gpu_driver_bug_workarounds_, this,
+ watchdog_thread_.get(), base::ThreadTaskRunnerHandle::Get().get(),
+ ChildProcess::current()->io_task_runner(),
+ ChildProcess::current()->GetShutDownEvent(), sync_point_manager_,
+ gpu_memory_buffer_factory_));
media_service_.reset(new MediaService(gpu_channel_manager_.get()));

Powered by Google App Engine
This is Rietveld 408576698