diff options
Diffstat (limited to 'chromium/content/gpu/gpu_child_thread.cc')
-rw-r--r-- | chromium/content/gpu/gpu_child_thread.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc index 1048a37c9aa..fd662f00492 100644 --- a/chromium/content/gpu/gpu_child_thread.cc +++ b/chromium/content/gpu/gpu_child_thread.cc @@ -17,6 +17,7 @@ #include "build/build_config.h" #include "content/child/child_process.h" #include "content/gpu/gpu_service_factory.h" +#include "content/public/browser/content_browser_client.h" #include "content/public/common/connection_filter.h" #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" @@ -147,10 +148,13 @@ ui::GpuMain::ExternalDependencies CreateGpuMainDependencies() { } // namespace +GpuChildThread* GpuChildThread::instance_ = 0; + GpuChildThread::GpuChildThread(std::unique_ptr<gpu::GpuInit> gpu_init, ui::GpuMain::LogMessages log_messages) : GpuChildThread(GetOptions(), std::move(gpu_init)) { gpu_main_.SetLogMessagesForHost(std::move(log_messages)); + instance_ = this; } GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params, @@ -173,6 +177,7 @@ GpuChildThread::GpuChildThread(const ChildThreadImpl::Options& options, base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kInProcessGPU)); } + instance_ = this; } GpuChildThread::~GpuChildThread() {} @@ -248,6 +253,10 @@ void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) { overlay_factory_cb); #endif +#if defined(TOOLKIT_QT) + gpu_channel_manager()->set_share_group(GetContentClient()->browser()->GetInProcessGpuShareGroup()); +#endif + // Only set once per process instance. service_factory_.reset(new GpuServiceFactory( gpu_service->gpu_preferences(), |