diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-08-04 18:07:02 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-23 13:31:33 +0200 |
commit | f5884c47c29bc65e6ce78b790a782e5ecf17e3b6 (patch) | |
tree | 1c2d29ec59eaca328c17b0c7342336752a48853b /chromium/content/gpu/gpu_child_thread.cc | |
parent | e6fbb0a33e5d34bcdace02c0eef046a47b563fe8 (diff) | |
download | qtwebengine-chromium-f5884c47c29bc65e6ce78b790a782e5ecf17e3b6.tar.gz |
Add accessors and seams for the Qt delegated renderer integration.
This is needed to fetch the MessageLoop, the MailboxManager and the
SyncPointManager of the GPU in-process host.
And fetch the right shared context for the in GPU thread.
Change-Id: I7f38e32b2df11da5b046f16643841d34260c11fb
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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 861c2f856c3..1b64290efe6 100644 --- a/chromium/content/gpu/gpu_child_thread.cc +++ b/chromium/content/gpu/gpu_child_thread.cc @@ -19,6 +19,7 @@ #include "components/viz/common/features.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" @@ -163,10 +164,13 @@ viz::VizMainImpl::ExternalDependencies CreateVizMainDependencies( } // namespace +GpuChildThread* GpuChildThread::instance_ = 0; + GpuChildThread::GpuChildThread(std::unique_ptr<gpu::GpuInit> gpu_init, viz::VizMainImpl::LogMessages log_messages) : GpuChildThread(GetOptions(), std::move(gpu_init)) { viz_main_.SetLogMessagesForHost(std::move(log_messages)); + instance_ = this; } GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params, @@ -191,6 +195,7 @@ GpuChildThread::GpuChildThread(const ChildThreadImpl::Options& options, base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kInProcessGPU)); } + instance_ = this; } GpuChildThread::~GpuChildThread() = default; @@ -271,6 +276,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(), |